本文整理汇总了C#中IUnitOfWork.Set方法的典型用法代码示例。如果您正苦于以下问题:C# IUnitOfWork.Set方法的具体用法?C# IUnitOfWork.Set怎么用?C# IUnitOfWork.Set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IUnitOfWork
的用法示例。
在下文中一共展示了IUnitOfWork.Set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddSubReportForm
public AddSubReportForm(IUnitOfWork unitOfWork,
IShowListForCities showListForCities,IShowListForDrivers showListForDrivers, IShowListForFreights showListForFreights)
: base(unitOfWork)
{
_paths = unitOfWork.Set<Path>();
_drivers = unitOfWork.Set<Driver>();
_freights = unitOfWork.Set<Freight>();
_showListForCities = showListForCities;
_showListForDrivers = showListForDrivers;
_showListForFreights = showListForFreights;
InitializeComponent();
_defaultControl = pathCombo;
pathCombo.Items.Clear();
_pathList = _paths.Where(x => x.ActiveState).ToList();
foreach (var tmp in _pathList.Select(path => $"{path.SourceCity} - {path.DestinationCity} :[{path.Id}]"))
pathCombo.Items.Add(tmp);
driverCombo.Items.Clear();
_driverList = _drivers.Where(x => x.ActiveState).ToList();
foreach (var tmp in
_driverList.Select(driver => $"{driver.Name} {driver.Family} - {driver.Plaque} :[{driver.Id}]"))
driverCombo.Items.Add(tmp);
freightCombo.Items.Clear();
_freightList = _freights.Where(x => x.ActiveState).ToList();
foreach (var tmp in _freightList)
freightCombo.Items.Add($"{tmp.Name} :[{tmp.Id}]");
}
示例2: RoleManagementService
public RoleManagementService(IUnitOfWork uow, ICacheProvider cache)
{
_uow = uow;
_role = uow.Set<Role>();
_userInRole = uow.Set<UserInRole>();
_actionRole = uow.Set<ActionRole>();
_cache = cache;
}
示例3: TrainingCourseService
public TrainingCourseService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_unitOfWork = unitOfWork;
_mappingEngine = mappingEngine;
_userManager = userManager;
_courses = _unitOfWork.Set<TrainingCourse>();
_centers = _unitOfWork.Set<TrainingCenter>();
}
示例4: MessageService
public MessageService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_conversations = _unitOfWork.Set<Conversation>();
_messages = _unitOfWork.Set<Message>();
_mappingEngine = mappingEngine;
}
示例5: ArticleEvaluationService
public ArticleEvaluationService(IAnswerOptionService answerOptionService,
IQuestionService questionService, IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_answerOptionService = answerOptionService;
_questionService = questionService;
_ArticleEvaluations = _unitOfWork.Set<ArticleEvaluation>();
_mappingEngine = mappingEngine;
_evaluationQuestions = _unitOfWork.Set<ArticleEvaluationQuestion>();
}
示例6: ReportService
public ReportService(IUnitOfWork unitOfWork,
IPathService pathService,
IDriverService driverService,
IFreightService freightService)
{
_pathService = pathService;
_driverService = driverService;
_freightService = freightService;
_reports = unitOfWork.Set<Report>();
_subReports = unitOfWork.Set<SubReport>();
}
示例7: ResearchExperienceService
public ResearchExperienceService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_researchExperiences = _unitOfWork.Set<ResearchExperience>();
_mappingEngine = mappingEngine;
}
示例8: InterviewService
public InterviewService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_interviews = _unitOfWork.Set<Interview>();
_mappingEngine = mappingEngine;
}
示例9: ReferentialTeacherService
public ReferentialTeacherService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_referentialTeachers = _unitOfWork.Set<ReferentialTeacher>();
_mappingEngine = mappingEngine;
}
示例10: AuditLogService
public AuditLogService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_logs = _unitOfWork.Set<AuditLog>();
_mappingEngine = mappingEngine;
}
示例11: NotificationSettingService
public NotificationSettingService(IUnitOfWork uow, IUserService userService, IMessagingGatewayAdapter messagingGateway)
{
_uow = uow;
_notification = uow.Set<NotificationSetting>();
_userService = userService;
_messagingGateway = messagingGateway;
}
示例12: TitleService
public TitleService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_titles = _unitOfWork.Set<Title>();
_mappingEngine = mappingEngine;
}
示例13: SessionRequestService
public SessionRequestService(IUnitOfWork uow, Lazy<INotificationService> notificationService, ISessionService sessionService)
{
_sessionService = sessionService;
_notificationService = notificationService;
_uow = uow;
_sessionRequest = uow.Set<SessionRequest>();
}
示例14: IeltsMaterialService
public IeltsMaterialService(IUnitOfWork uow, Lazy<INotificationService> notificationService, Lazy<IFilesProxyAdapter> filesProxyAdapter)
{
_uow = uow;
_IeltsMaterial = uow.Set<IeltsMaterial>();
_notificationService = notificationService;
_filesProxyAdapter = filesProxyAdapter;
}
示例15: EntireEvaluationService
public EntireEvaluationService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_entireEvaluations = _unitOfWork.Set<EntireEvaluation>();
_mappingEngine = mappingEngine;
}