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


C# IUnitOfWork.Set方法代码示例

本文整理汇总了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}]");
        }
开发者ID:mortezaraeisi,项目名称:Basim,代码行数:30,代码来源:AddSubReportForm.cs

示例2: RoleManagementService

 public RoleManagementService(IUnitOfWork uow, ICacheProvider cache)
 {
     _uow = uow;
     _role = uow.Set<Role>();
     _userInRole = uow.Set<UserInRole>();
     _actionRole = uow.Set<ActionRole>();
     _cache = cache;
 }
开发者ID:YekanPedia,项目名称:ManagementSystem,代码行数:8,代码来源:RoleManagementService.cs

示例3: TrainingCourseService

 public TrainingCourseService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
 {
     _unitOfWork = unitOfWork;
     _mappingEngine = mappingEngine;
     _userManager = userManager;
     _courses = _unitOfWork.Set<TrainingCourse>();
   
     _centers = _unitOfWork.Set<TrainingCenter>();
 }
开发者ID:raminmjj,项目名称:Decision,代码行数:9,代码来源:TrainingCourseService.cs

示例4: MessageService

        public MessageService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
        {
            _userManager = userManager;
            _unitOfWork = unitOfWork;
            _conversations = _unitOfWork.Set<Conversation>();
            _messages = _unitOfWork.Set<Message>();
            _mappingEngine = mappingEngine;

        }
开发者ID:rabbal,项目名称:Decision,代码行数:9,代码来源:MessageService.cs

示例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>();
 }
开发者ID:raminmjj,项目名称:Decision,代码行数:11,代码来源:ArticleEvaluationService.cs

示例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>();
 }
开发者ID:mortezaraeisi,项目名称:Basim,代码行数:11,代码来源:ReportService.cs

示例7: ResearchExperienceService

 public ResearchExperienceService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
 {
     _userManager = userManager;
     _unitOfWork = unitOfWork;
     _researchExperiences = _unitOfWork.Set<ResearchExperience>();
     _mappingEngine = mappingEngine;
 }
开发者ID:raminmjj,项目名称:Decision,代码行数:7,代码来源:ResearchExperienceService.cs

示例8: InterviewService

 public InterviewService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
 {
     _userManager = userManager;
     _unitOfWork = unitOfWork;
     _interviews = _unitOfWork.Set<Interview>();
     _mappingEngine = mappingEngine;
 }
开发者ID:rabbal,项目名称:Decision,代码行数:7,代码来源:InterviewService.cs

示例9: ReferentialTeacherService

 public ReferentialTeacherService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
 {
     _userManager = userManager;
     _unitOfWork = unitOfWork;
     _referentialTeachers = _unitOfWork.Set<ReferentialTeacher>();
     _mappingEngine = mappingEngine;
 }
开发者ID:raminmjj,项目名称:Decision,代码行数:7,代码来源:ReferentialJudgeService.cs

示例10: AuditLogService

 public AuditLogService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
 {
     _userManager = userManager;
     _unitOfWork = unitOfWork;
     _logs = _unitOfWork.Set<AuditLog>();
     _mappingEngine = mappingEngine;
 }
开发者ID:raminmjj,项目名称:Decision,代码行数:7,代码来源:AuditLogService.cs

示例11: NotificationSettingService

 public NotificationSettingService(IUnitOfWork uow, IUserService userService, IMessagingGatewayAdapter messagingGateway)
 {
     _uow = uow;
     _notification = uow.Set<NotificationSetting>();
     _userService = userService;
     _messagingGateway = messagingGateway;
 }
开发者ID:YekanPedia,项目名称:ManagementSystem,代码行数:7,代码来源:NotificationSettingService.cs

示例12: TitleService

 public TitleService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
 {
     _userManager = userManager;
     _unitOfWork = unitOfWork;
     _titles = _unitOfWork.Set<Title>();
     _mappingEngine = mappingEngine;
 }
开发者ID:raminmjj,项目名称:Decision,代码行数:7,代码来源:TitleService.cs

示例13: SessionRequestService

 public SessionRequestService(IUnitOfWork uow, Lazy<INotificationService> notificationService, ISessionService sessionService)
 {
     _sessionService = sessionService;
     _notificationService = notificationService;
     _uow = uow;
     _sessionRequest = uow.Set<SessionRequest>();
 }
开发者ID:YekanPedia,项目名称:ManagementSystem,代码行数:7,代码来源:SessionRequestService.cs

示例14: IeltsMaterialService

 public IeltsMaterialService(IUnitOfWork uow, Lazy<INotificationService> notificationService, Lazy<IFilesProxyAdapter> filesProxyAdapter)
 {
     _uow = uow;
     _IeltsMaterial = uow.Set<IeltsMaterial>();
     _notificationService = notificationService;
     _filesProxyAdapter = filesProxyAdapter;
 }
开发者ID:YekanPedia,项目名称:ManagementSystem,代码行数:7,代码来源:IeltsMaterialService.cs

示例15: EntireEvaluationService

 public EntireEvaluationService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
 {
     _userManager = userManager;
     _unitOfWork = unitOfWork;
     _entireEvaluations = _unitOfWork.Set<EntireEvaluation>();
     _mappingEngine = mappingEngine;
 }
开发者ID:rabbal,项目名称:Decision,代码行数:7,代码来源:EnitreEvaluationService.cs


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