当前位置: 首页>>代码示例>>C#>>正文


C# IAllReadyDataAccess类代码示例

本文整理汇总了C#中IAllReadyDataAccess的典型用法代码示例。如果您正苦于以下问题:C# IAllReadyDataAccess类的具体用法?C# IAllReadyDataAccess怎么用?C# IAllReadyDataAccess使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IAllReadyDataAccess类属于命名空间,在下文中一共展示了IAllReadyDataAccess类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WithSkills

 public static ViewResult WithSkills(this ViewResult view, IAllReadyDataAccess dataAccess)
 {
     view.ViewData["Skills"] = dataAccess.Skills
         .OrderBy(a => a.HierarchicalName)
         .ToList();
     return view;
 }
开发者ID:BredStik,项目名称:allReady,代码行数:7,代码来源:ControllerExtensions.cs

示例2: SiteController

 public SiteController(UserManager<ApplicationUser> userManager, IEmailSender emailSender, IAllReadyDataAccess dataAccess, ILogger<SiteController> logger)
 {
     _userManager = userManager;
     _emailSender = emailSender;
     _dataAccess = dataAccess;
     _logger = logger;
 }
开发者ID:teopenna,项目名称:allReady,代码行数:7,代码来源:SiteAdminController.cs

示例3: ActivityController

 public ActivityController(IAllReadyDataAccess dataAccess, UserManager<ApplicationUser> userManager, IImageService imageService, IMediator bus)
 {
     _dataAccess = dataAccess;
     _userManager = userManager;
     _imageService = imageService;
     _bus = bus;
 }
开发者ID:CarlHA,项目名称:allReady,代码行数:7,代码来源:ActivityAdminController.cs

示例4: WithSkills

 public static ViewResult WithSkills(this ViewResult view, IAllReadyDataAccess dataAccess, int? organizationId = null)
 {
     view.ViewData["Skills"] = dataAccess.Skills
         .Where(s => s.OwningOrganizationId == null || organizationId == null || s.OwningOrganizationId == organizationId)
         .OrderBy(a => a.HierarchicalName)
         .ToList();
     return view;
 }
开发者ID:weiplanet,项目名称:allReady,代码行数:8,代码来源:ControllerExtensions.cs

示例5: ActivityController

 public ActivityController(
     IAllReadyDataAccess allReadyDataAccess,
     UserManager<ApplicationUser> userManager,
     IClosestLocations closestLocations)
 {
     _allReadyDataAccess = allReadyDataAccess;
     _userManager = userManager;
 }
开发者ID:modulexcite,项目名称:allReady,代码行数:8,代码来源:ActivityController.cs

示例6: ActivityApiController

 public ActivityApiController(IAllReadyDataAccess allReadyDataAccess,
     //GeoService geoService,
     IClosestLocations closestLocations)
 {
     _allReadyDataAccess = allReadyDataAccess;
     //_geoService = geoService;
     _closestLocations = closestLocations;
 }
开发者ID:ResaWildermuth,项目名称:allReady,代码行数:8,代码来源:ActivityApiController.cs

示例7: ActivityApiController

 public ActivityApiController(IAllReadyDataAccess allReadyDataAccess,
     UserManager<ApplicationUser> userManager,
     //GeoService geoService,
     IClosestLocations closestLocations)
 {
     _allReadyDataAccess = allReadyDataAccess;
     _userManager = userManager;
     //_geoService = geoService;
     _closestLocations = closestLocations;
 }
开发者ID:rebeccacollins,项目名称:allReady,代码行数:10,代码来源:ActivityApiController.cs

示例8: ToModel

 public static Tenant ToModel(this TenantViewModel tenant, IAllReadyDataAccess dataAccess)
 {
     return new Tenant
     {
         Id = tenant.Id,
         Name = tenant.Name,
         Campaigns = tenant.Campaigns.ToModel(dataAccess).ToList(),
         LogoUrl = tenant.LogoUrl,
         WebUrl = tenant.WebUrl
     };
 }
开发者ID:jcastillopino,项目名称:allReady,代码行数:11,代码来源:TenantViewModel.cs

示例9: ManageController

 public ManageController(
     UserManager<ApplicationUser> userManager,
     SignInManager<ApplicationUser> signInManager,
     IEmailSender emailSender,
     ISmsSender smsSender,
     IAllReadyDataAccess dataAccess)
 {
     _userManager = userManager;
     _signInManager = signInManager;
     _emailSender = emailSender;
     _smsSender = smsSender;
     _dataAccess = dataAccess;
 }
开发者ID:BredStik,项目名称:allReady,代码行数:13,代码来源:ManageController.cs

示例10: CampaignController

 public CampaignController(IMediator bus, IImageService imageService, IAllReadyDataAccess dataAccess)
 {
     _bus = bus;
     _imageService = imageService;
     _dataAccess = dataAccess;
 }
开发者ID:fr33k3r,项目名称:allReady,代码行数:6,代码来源:CampaignController.cs

示例11: CampaignController

 public CampaignController(IAllReadyDataAccess dataAccess, UserManager<ApplicationUser> userManager)
 {
     _dataAccess = dataAccess;
     _userManager = userManager;
 }
开发者ID:CarlHA,项目名称:allReady,代码行数:5,代码来源:CampaignAdminController.cs

示例12: ToModel

        public static Campaign ToModel(this CampaignViewModel campaign, IAllReadyDataAccess dataAccess)
        {
            var tenant = dataAccess.GetTenant(campaign.ManagingTenantId);

            if (tenant == null)
                return null;

            return new Campaign
            {
                Id = campaign.Id,
                Description = campaign.Description,
                Name = campaign.Name,
                ManagingTenant = tenant,
                ParticipatingTenants = campaign.ParticipatingTenants,
                Activities = campaign.Activities.ToModel(dataAccess).ToList(),
                EndDateTimeUtc = campaign.EndDate.UtcDateTime,
                StartDateTimeUtc = campaign.StartDate.UtcDateTime
            };
        }
开发者ID:robfoulk,项目名称:allReady,代码行数:19,代码来源:CampaignViewModel.cs

示例13: ActivityController

 public ActivityController(IAllReadyDataAccess dataAccess, IImageService imageService, IMediator bus)
 {
     _dataAccess = dataAccess;
     _imageService = imageService;
     _bus = bus;
 }
开发者ID:weiplanet,项目名称:allReady,代码行数:6,代码来源:ActivityAdminController.cs

示例14: WithUserInfo

 public static ActivityViewModel WithUserInfo(this ActivityViewModel viewModel, Activity activity, ClaimsPrincipal user, IAllReadyDataAccess dataAccess)
 {
     if (user.IsSignedIn())
     {
         var userId = user.GetUserId();
         var appUser = dataAccess.GetUser(userId);
         viewModel.UserId = userId;
         viewModel.UserSkills = appUser?.AssociatedSkills?.Select(us => us.Skill).ToList();
         viewModel.IsUserVolunteeredForActivity = dataAccess.GetActivitySignups(viewModel.Id, userId).Any();
         var assignedTasks = activity.Tasks.Where(t => t.AssignedVolunteers.Any(au => au.User.Id == userId)).ToList();
         viewModel.Tasks = new List<TaskViewModel>(assignedTasks.Select(data => new TaskViewModel(data, userId)).OrderBy(task => task.StartDateTime));
         viewModel.SignupModel = new ActivitySignupViewModel()
         {
             ActivityId = viewModel.Id,
             UserId = userId,
             Name = appUser.Name,
             PreferredEmail = appUser.Email,
             PreferredPhoneNumber = appUser.PhoneNumber
         };
     }
     else
     {
         viewModel.Tasks = new List<TaskViewModel>();
     }
     return viewModel;
 }
开发者ID:fr33k3r,项目名称:allReady,代码行数:26,代码来源:ActivityViewModel.cs

示例15: TaskController

 public TaskController(IAllReadyDataAccess dataAccess, IMediator bus)
 {
     _dataAccess = dataAccess;
     _bus = bus;
 }
开发者ID:BredStik,项目名称:allReady,代码行数:5,代码来源:TaskController.cs


注:本文中的IAllReadyDataAccess类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。