本文整理汇总了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;
}
示例2: SiteController
public SiteController(UserManager<ApplicationUser> userManager, IEmailSender emailSender, IAllReadyDataAccess dataAccess, ILogger<SiteController> logger)
{
_userManager = userManager;
_emailSender = emailSender;
_dataAccess = dataAccess;
_logger = logger;
}
示例3: ActivityController
public ActivityController(IAllReadyDataAccess dataAccess, UserManager<ApplicationUser> userManager, IImageService imageService, IMediator bus)
{
_dataAccess = dataAccess;
_userManager = userManager;
_imageService = imageService;
_bus = bus;
}
示例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;
}
示例5: ActivityController
public ActivityController(
IAllReadyDataAccess allReadyDataAccess,
UserManager<ApplicationUser> userManager,
IClosestLocations closestLocations)
{
_allReadyDataAccess = allReadyDataAccess;
_userManager = userManager;
}
示例6: ActivityApiController
public ActivityApiController(IAllReadyDataAccess allReadyDataAccess,
//GeoService geoService,
IClosestLocations closestLocations)
{
_allReadyDataAccess = allReadyDataAccess;
//_geoService = geoService;
_closestLocations = closestLocations;
}
示例7: ActivityApiController
public ActivityApiController(IAllReadyDataAccess allReadyDataAccess,
UserManager<ApplicationUser> userManager,
//GeoService geoService,
IClosestLocations closestLocations)
{
_allReadyDataAccess = allReadyDataAccess;
_userManager = userManager;
//_geoService = geoService;
_closestLocations = closestLocations;
}
示例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
};
}
示例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;
}
示例10: CampaignController
public CampaignController(IMediator bus, IImageService imageService, IAllReadyDataAccess dataAccess)
{
_bus = bus;
_imageService = imageService;
_dataAccess = dataAccess;
}
示例11: CampaignController
public CampaignController(IAllReadyDataAccess dataAccess, UserManager<ApplicationUser> userManager)
{
_dataAccess = dataAccess;
_userManager = userManager;
}
示例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
};
}
示例13: ActivityController
public ActivityController(IAllReadyDataAccess dataAccess, IImageService imageService, IMediator bus)
{
_dataAccess = dataAccess;
_imageService = imageService;
_bus = bus;
}
示例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;
}
示例15: TaskController
public TaskController(IAllReadyDataAccess dataAccess, IMediator bus)
{
_dataAccess = dataAccess;
_bus = bus;
}