コード例 #1
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context    = context;
     Employees   = new EmployeeRepository(_context);
     Departments = new DepartmentRepository(_context);
     Assignments = new AssignmentRepository(_context);
 }
コード例 #2
0
        public AssignmentService(IAssignmentRepository assignmentRepository, IActivityRepository activityRepository,
                                 IDocumentRepository documentRepository)
        {
            if (assignmentRepository == null)
            {
                throw new ArgumentNullException(nameof(assignmentRepository));
            }

            _assignmentRepository = assignmentRepository;

            if (activityRepository == null)
            {
                throw new ArgumentNullException(nameof(activityRepository));
            }

            _activityRepository = activityRepository;

            if (documentRepository == null)
            {
                throw new ArgumentNullException(nameof(documentRepository));
            }

            _documentRepository = documentRepository;

            listAttachments = new List <System.Net.Mail.Attachment>();
            listUsers       = new List <string>();
            listUsersCC     = new List <string>();
            email           = new EmailHelper("", "", "", "");
        }
コード例 #3
0
 public AssignmentType(IAssignmentRepository assignmentRepository, IDataLoaderContextAccessor dataLoader,
                       IAssignmentStatusRepository statusRepository, ICategoryRepository categoryRepository,
                       ISubTaskRepository subTaskRepository)
 {
     Field(t => t.Id);
     Field(t => t.Name);
     Field(t => t.Description);
     Field(t => t.DueDate);
     Field(t => t.Important);
     Field <StatusType, AssignmentStatus>()
     .Name("TaskStatus")
     .ResolveAsync(ctx =>
     {
         var loader = dataLoader.Context.GetOrAddBatchLoader <int, AssignmentStatus>(
             "GetStatus", statusRepository.GetStatusForAssignments);
         return(loader.LoadAsync(ctx.Source.Id));
     });
     Field <CategoryType, Category>()
     .Name("TaskCategory")
     .ResolveAsync(context =>
     {
         var loader = dataLoader.Context.GetOrAddBatchLoader <int, Category>(
             "GetCategory", categoryRepository.GetCategoryForAssignments);
         return(loader.LoadAsync(context.Source.Id));
     });
     Field <ListGraphType <SubTaskType>, IEnumerable <SubTask> >()
     .Name("SubTasks")
     .ResolveAsync(context =>
     {
         var loader = dataLoader.Context.GetOrAddCollectionBatchLoader <int, SubTask>(
             "GetSubTasks", subTaskRepository.GetSubTasksForAssignments);
         return(loader.LoadAsync(context.Source.Id));
     });
 }
コード例 #4
0
 public AssignmentUnitOfWork(IAssignmentRepository assignmentRepository)
 {
     _AssignmentRepository = assignmentRepository;
     connection = new SqlConnection(DBHelper.ConnectionString);
     connection.Open();
     _AssignmentRepository.DbContext = new SqlDbContext() { Transaction = connection.BeginTransaction() };
 }
コード例 #5
0
 public QuizRepository(IQuestionRepository questionRepo,
                       IAssignmentRepository assignmentRepo, WebdictaatContext context)
 {
     _context        = context;
     _questionRepo   = questionRepo;
     _assignmentRepo = assignmentRepo;
 }
コード例 #6
0
 public CourseDetailViewModel(ICourseRepository courseRepository,
                              IAssignmentRepository assignmentRepository)
 {
     this.courseRepository     = courseRepository;
     this.assignmentRepository = assignmentRepository;
     Course      = new Course();
     Assignments = new Assignment[] {};
 }
コード例 #7
0
 public AssignmentsController(
     IAssignmentRepository assignmentRepo,
     IMapper mapper,
     ILogger <AssignmentsController> logger)
 {
     _AssignmentRepo = assignmentRepo;
     _Mapper         = mapper;
     _Logger         = logger;
 }
コード例 #8
0
 public ProblemsController(
     IProblemRepository problemRepository,
     IEnrolementRepository enrolementRepository,
     IAssignmentRepository assignmentRepository)
 {
     this.problemRepository    = problemRepository;
     this.enrolementRepository = enrolementRepository;
     this.assignmentRepository = assignmentRepository;
 }
コード例 #9
0
 public AssignmentController(
     IAuthorizeService authorizeService,
     IAssignmentRepository assignmentRepo,
     UserManager <Domain.User.ApplicationUser> userManager) : base(authorizeService)
 {
     _assignmentRepo   = assignmentRepo;
     _userManager      = userManager;
     _authorizeService = authorizeService;
 }
コード例 #10
0
 public ClassController(IAssignmentSubmitRepository assignmentSubmitRepository, IUserRepository userRepository, UserManager <IdentityUser> userManager, AppDbContext appDbContext, IClassRepository classesRepository, IAssignmentRepository assignmentRepository, IStreamRepository streamRepository)
 {
     _appDbContext                   = appDbContext;
     _classesRepository              = classesRepository;
     _assignmentRepository           = assignmentRepository;
     _streamRepository               = streamRepository;
     this.userManager                = userManager;
     this.userRepository             = userRepository;
     this.assignmentSubmitRepository = assignmentSubmitRepository;
 }
コード例 #11
0
        public AssignmentController()
        {
            UnitOfWork unitOfWork = new UnitOfWork();

            this._IAssignmentQuestionRepository = new AssignmentQuestionRepository(unitOfWork);
            this._IAssignmentRepository         = new AssignmentRepository(unitOfWork);
            // this._IMonitoringMethodRepository = new MonitoringMethodRepository(unitOfWork);
            // this._IDurationUnitRepository = new DurationUnitRepository(unitOfWork);
            this._caching = new CacheManagement();
        }
コード例 #12
0
        public void Init(IAssignmentRepository r)
        {
            _repo = r;
            var collection = r.GetCollection();

            foreach (IAssignment a in collection)
            {
                this[a.uniqueId] = a;
            }
        }
コード例 #13
0
 public AssignmentsController(
     IBoardRepository boardRepository,
     IBoardMemberRepository memberRepository,
     IKanbanTaskRepository taskRepository,
     IAssignmentRepository assignmentRepository)
 {
     _boardRepository      = boardRepository;
     _memberRepository     = memberRepository;
     _taskRepository       = taskRepository;
     _assignmentRepository = assignmentRepository;
 }
 public IEnumerable <Problem> FindProblemsByAssignment(Guid assignmentId, IAssignmentRepository assignmentRepository)
 {
     // only implementing the linq version, see UserEntityFrameworkRepository.FindUsersByClass for SQL implementation
     return((
                from p in this.Problems.ToList()
                join a in assignmentRepository.Assignments
                on p.ProblemId equals a.ProblemId
                where a.AssignmentId == assignmentId
                select p
                ).ToList());
 }
コード例 #15
0
 public AssignmentService(IAssignmentRepository assignmentRepository, IPlanService planService, ILogger <AssignmentService> logger,
                          IPlanRepository planRepository, IPatrolRepository patrolRepository, IGroupRepository groupRepository, IMapper mapper, ISystemClock clock)
 {
     _assignmentRepository = assignmentRepository;
     _logger           = logger;
     _mapper           = mapper;
     _planService      = planService;
     _planRepository   = planRepository;
     _patrolRepository = patrolRepository;
     _groupRepository  = groupRepository;
     _clock            = clock;
 }
コード例 #16
0
 public DeviceAssignmentController(IMapper mapper,
                                   IAssignmentRepository repo,
                                   IAuthority auth,
                                   IDeviceRepository deviceRepo,
                                   IAssigneeRepository assigneeRepo)
 {
     _mapper       = mapper;
     _repo         = repo;
     _auth         = auth;
     _deviceRepo   = deviceRepo;
     _assigneeRepo = assigneeRepo;
 }
コード例 #17
0
ファイル: UnitOfWork.cs プロジェクト: triax7/OrgControl
 public UnitOfWork(ApplicationContext context, IUserRepository userRepository,
                   IRefreshTokenRepository refreshTokenRepository, IEventRepository eventRepository, IRoleRepository roleRepository,
                   IAssignmentRepository assignmentRepository, IZoneRepository zoneRepository)
 {
     _context      = context;
     Users         = userRepository;
     RefreshTokens = refreshTokenRepository;
     Events        = eventRepository;
     Roles         = roleRepository;
     Assignments   = assignmentRepository;
     Zones         = zoneRepository;
 }
コード例 #18
0
 public AssignmentController(ILogger <AssignmentController> logger, IPatrolRepository patrolRepository, IPlanRepository planRepository,
                             IAssignmentRepository assignmentRepository, IPlanService planService, IAssignmentService assignmentService, IUserRepository userRepository,
                             IPatrolService patrolService, ISystemClock systemClock)
 {
     _logger               = logger;
     _patrolRepository     = patrolRepository;
     _planRepository       = planRepository;
     _assignmentRepository = assignmentRepository;
     _planService          = planService;
     _assignmentService    = assignmentService;
     _userRepository       = userRepository;
     _patrolService        = patrolService;
     _clock = systemClock;
 }
コード例 #19
0
ファイル: AssignmentService.cs プロジェクト: r15h1/heyteam
 public AssignmentService(IValidator <AssignmentRequest> assignementRequestValidator,
                          IClubQuery clubQuery,
                          ISquadQuery squadQuery,
                          IMemberQuery memberQuery,
                          ILibraryQuery libraryQuery,
                          IAssignmentRepository assignmentRepository,
                          IAssignmentQuery assignmentQuery
                          )
 {
     this.assignementRequestValidator = assignementRequestValidator;
     this.clubQuery            = clubQuery;
     this.squadQuery           = squadQuery;
     this.memberQuery          = memberQuery;
     this.libraryQuery         = libraryQuery;
     this.assignmentRepository = assignmentRepository;
     this.assignmentQuery      = assignmentQuery;
 }
コード例 #20
0
 //private readonly System.Web.Mvc.HtmlHelper _htmlHelper;
 public ClassroomController(IClassroomRepository classRepo, IClassroomUserRepository classUser,
                            IBlackBoardRepository boardRepo, IInviteRepository inviteRepo, IAssignmentRepository assignmentRepo,
                            ISubmittedAssignmentRepository submittedAssignmentRepo,
                            ICommentRepository commentRepo,
                            IHostingEnvironment hostingEnvironment, UserManager <AppUser> userManager, SignInManager <AppUser> signInManager)
 {
     _classRepo               = classRepo;
     _classUserRepo           = classUser;
     _boardRepo               = boardRepo;
     _inviteRepo              = inviteRepo;
     _assignmentRepo          = assignmentRepo;
     _submittedAssignmentRepo = submittedAssignmentRepo;
     _commentRepo             = commentRepo;
     _hostingEnvironment      = hostingEnvironment;
     _userManager             = userManager;
     _signInManager           = signInManager;
 }
 public AssignmentController(UserManager <ApplicationUser> userManager,
                             IConfiguration configuration,
                             IAssignmentRepository assignmentRepository,
                             IExhibitorRepository exhibitorRepository,
                             IGroupRepository groupRepository,
                             ICategoryRepository categoryRepository,
                             IImageWriter imageWriter,
                             IQuestionRepository questionRepository)
 {
     _groupRepository      = groupRepository;
     _userManager          = userManager;
     _configuration        = configuration;
     _assignmentRepository = assignmentRepository;
     _exhibitorRepository  = exhibitorRepository;
     _categoryRepository   = categoryRepository;
     _exhibitorManager     =
         new ExhibitorManager(exhibitorRepository, categoryRepository, questionRepository);
     _questionRepository = questionRepository;
     _imageWriter        = imageWriter;
 }
コード例 #22
0
 public AssignmentService(IAssignmentRepository _AssignmentRepository)
 {
     this._AssignmentRepository = _AssignmentRepository;
 }
コード例 #23
0
 public AssignmentQueryHandler(IAssignmentRepository repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
コード例 #24
0
 public SubmissionService(ISubmissionRepository submissionRepository, IAssignmentRepository assignmentRepository, IUserRepository userRepository)
 {
     this.submissionRepository = submissionRepository;
     this.assignmentRepository = assignmentRepository;
     this.userRepository       = userRepository;
 }
コード例 #25
0
 public AssignmentsResource(IAssignmentRepository assignmentRepository, IMapper mapper)
 {
     _repository = assignmentRepository;
     _mapper     = mapper;
 }
コード例 #26
0
ファイル: AssignmentController.cs プロジェクト: rscue/api
 public AssignmentController(IAssignmentRepository assignmentRepository, IImageBucketRepository imageBucketRepository, INotificationServices notificationServices)
 {
     _assignmentRepository  = assignmentRepository ?? throw new ArgumentNullException(nameof(assignmentRepository));
     _imageBucketRepository = imageBucketRepository ?? throw new ArgumentNullException(nameof(imageBucketRepository));
     _notificationServices  = notificationServices ?? throw new ArgumentNullException(nameof(notificationServices));
 }
コード例 #27
0
 public AssignmentService(IAssignmentRepository assignmentRepository)
 {
     this.assignmentRepository = assignmentRepository;
 }
コード例 #28
0
 public AssignmentsController(IAssignmentRepository repo, IMapper mapper, IHttpContextAccessor httpContextAccessor, IFileProvider fileProvider)
 {
     _mapper       = mapper;
     _repo         = repo;
     _fileProvider = fileProvider;
 }
コード例 #29
0
 public SprintService(ISprintRepository sprintRepository, IAssignmentRepository assignmentRepository)
 {
     _sprintRepository = sprintRepository;
     _assignmentRepository = assignmentRepository;
 }
コード例 #30
0
 public AssignmentService(IAssignmentRepository assignmentRepository, IUnitOfWork unitOfWork)
 {
     _assignmentRepository = assignmentRepository;
     _unitOfWork           = unitOfWork;
 }
コード例 #31
0
 public AssignmentController(IAssignmentRepository repository)
 {
     _repository = repository;
 }
コード例 #32
0
 public AssignmentService(IAssignmentRepository assignmentRepository)
 {
     _assignmentRepository = assignmentRepository;
 }
コード例 #33
0
 public AssignmentController(IAssignmentRepository repository)
 {
     _repository = repository;
 }
コード例 #34
0
 public AssignmentsController(IAssignmentRepository assignmentRepository)
 {
     _assignmentRepository = assignmentRepository;
     //_context = context;
 }
コード例 #35
0
 public AssignmentManager(IAssignmentRepository repo, ICourseRepository courseRepository)
 {
     _assignmentRepository = repo;
     _courseRepository = courseRepository;
 }