Example #1
0
 public NumbersService(INumberProvider numberProvider, IDepartmentSettingsService departmentSettingsService,
                       IGenericDataRepository <InboundMessageEvent> inboundMessageEventRepository)
 {
     _numberProvider                = numberProvider;
     _departmentSettingsService     = departmentSettingsService;
     _inboundMessageEventRepository = inboundMessageEventRepository;
 }
Example #2
0
 protected BasicService(IGenericDataRepository <TSqlEntity, TDomain> genericRepository, IUnitOfWork unitOfWork, IMongoLogger <TDomain> logger, ILocalizationProvider <TDomain> localizationProvider)
 {
     _genericRepository   = genericRepository;
     UnitOfWork           = unitOfWork;
     Logger               = logger;
     LocalizationProvider = localizationProvider;
 }
        public bool SaveDepartment(Department department)
        {
            IGenericDataRepository <Department> departmentRepo = _uow.RepositoryFor <Department>();

            departmentRepo.Add(department);
            return(true);
        }
Example #4
0
 public UserIdentity(string name, IGenericDataRepository <UserEntity, User> userRepository)
 {
     if (name != null)
     {
         Init(name, userRepository);
     }
 }
Example #5
0
 private void Init(string name, IGenericDataRepository <UserEntity, User> userRepository)
 {
     if (!string.IsNullOrEmpty(name))
     {
         User = userRepository.First(u => u.Login == name || u.Id == name || u.Email == name);
     }
 }
        public bool SaveCourse(Course course)
        {
            IGenericDataRepository <Course> courseRepo = _uow.RepositoryFor <Course>();

            courseRepo.Add(course);
            return(true);
        }
        public bool SaveStudent(Student student)
        {
            IGenericDataRepository <Student> studentRepo = _uow.RepositoryFor <Student>();

            studentRepo.Add(student);
            return(true);
        }
        /// <summary>
        ///     Creates a CategoryRepository Object
        /// </summary>
        /// <param name="dataAccess">Instanced a <see cref="IGenericDataRepository{T}" /> type of <see cref="Category" /></param>
        public CategoryRepository(IGenericDataRepository <Category> dataAccess)
        {
            this.dataAccess = dataAccess;

            Data = new ObservableCollection <Category>();
            Load();
        }
        public Course GetCourseByCode(string code)
        {
            IGenericDataRepository <Course> courseRepo = _uow.RepositoryFor <Course>();
            var course = courseRepo.GetSingle(p => p.CourseCode.Equals(code));

            return(course);
        }
        public IList <Course> GetAllCourse()
        {
            IGenericDataRepository <Course> courseRepo = _uow.RepositoryFor <Course>();
            var courseList = courseRepo.GetAll();

            return(courseList);
        }
        public Department GetDepartmentByCode(string code)
        {
            IGenericDataRepository <Department> courseRepo = _uow.RepositoryFor <Department>();
            var department = courseRepo.GetSingle(p => p.DepartmentCode.Equals(code));

            return(department);
        }
Example #12
0
        /// <summary>
        ///     Creates a AccountRepository Object
        /// </summary>
        /// <param name="dataAccess">Instanced a <see cref="IGenericDataRepository{T}" /> type of <see cref="Account" /></param>
        public AccountRepository(IGenericDataRepository <Account> dataAccess)
        {
            this.dataAccess = dataAccess;

            Data = new ObservableCollection <Account>();
            Load();
        }
        public IList <Department> GetAllDepartment()
        {
            IGenericDataRepository <Department> deptRepo = _uow.RepositoryFor <Department>();
            var departments = deptRepo.GetAll().ToList();

            return(departments);
        }
        public IList <Student> GetAllStudent()
        {
            IGenericDataRepository <Student> studentRepo = _uow.RepositoryFor <Student>();
            var students = studentRepo.GetAll().ToList();

            return(students);
        }
Example #15
0
 public AccountService(IGenericDataRepository <UserEntity, User> userRepository, IRoleRepository roleRepository, IUnitOfWork unitOfWork, IMongoLogger <User> logger, IGenericDataRepository <PublisherEntity, Publisher> publisherRepository,
                       ILocalizationProvider <User> localizatorProvider) : base(userRepository, unitOfWork, logger, localizatorProvider)
 {
     _userRepository      = userRepository;
     _roleRepository      = roleRepository;
     _publisherRepository = publisherRepository;
 }
        /// <summary>
        ///     Creates a AccountRepository Object
        /// </summary>
        /// <param name="dataAccess">Instanced a <see cref="IGenericDataRepository{T}" /> type of <see cref="Account" /></param>
        public AccountRepository(IGenericDataRepository<Account> dataAccess)
        {
            this.dataAccess = dataAccess;

            Data = new ObservableCollection<Account>();
            Load();
        }
Example #17
0
 public UserProfileService(IUserProfilesRepository userProfileRepository, IDepartmentsService departmentsService, ICacheProvider cacheProvider,
                           IGenericDataRepository <DepartmentMember> departmentMemberRepository)
 {
     _userProfileRepository      = userProfileRepository;
     _departmentsService         = departmentsService;
     _cacheProvider              = cacheProvider;
     _departmentMemberRepository = departmentMemberRepository;
 }
Example #18
0
 public PersonnelRolesService(IGenericDataRepository <PersonnelRole> personnelRolesRepository, IGenericDataRepository <PersonnelRoleUser> personnelRoleUsersRepository,
                              ISubscriptionsService subscriptionsService, IGenericDataRepository <DepartmentMember> departmentMemberRepository)
 {
     _personnelRolesRepository     = personnelRolesRepository;
     _personnelRoleUsersRepository = personnelRoleUsersRepository;
     _subscriptionsService         = subscriptionsService;
     _departmentMemberRepository   = departmentMemberRepository;
 }
Example #19
0
 public OrderService(IUnitOfWork unitOfWork, IDecoratorOrderRepository decoratorOrderRepository, IGameRepository gameRepository, IGenericDataRepository <OrderDetailsEntity, OrderDetails> orderDetailsRepository, IMongoLogger <Order> logger,
                     ILocalizationProvider <Order> localizationProvider) : base(decoratorOrderRepository, unitOfWork, logger, localizationProvider)
 {
     _decoratorOrderRepository = decoratorOrderRepository;
     _gameRepository           = gameRepository;
     _orderDetailsRepository   = orderDetailsRepository;
     _orderPipeLine            = new OrderPipeLine();
 }
Example #20
0
 public CalendarService(ICalendarItemsRepository calendarItemRepository, IGenericDataRepository <CalendarItemType> calendarItemTypeRepository,
                        IGenericDataRepository <CalendarItemAttendee> calendarItemAttendeeRepository, IDepartmentsService departmentsService)
 {
     _calendarItemRepository         = calendarItemRepository;
     _calendarItemTypeRepository     = calendarItemTypeRepository;
     _calendarItemAttendeeRepository = calendarItemAttendeeRepository;
     _departmentsService             = departmentsService;
 }
Example #21
0
 public CustomStateService(IGenericDataRepository <CustomState> customStateRepository, IGenericDataRepository <CustomStateDetail> customStateDetailRepository,
                           IEventAggregator eventAggregator, ICacheProvider cacheProvider)
 {
     _customStateRepository       = customStateRepository;
     _customStateDetailRepository = customStateDetailRepository;
     _eventAggregator             = eventAggregator;
     _cacheProvider = cacheProvider;
 }
Example #22
0
 public WorkLogsService(IGenericDataRepository <Log> logsRepository, IGenericDataRepository <CallLog> callLogsRepository, IGenericDataRepository <LogUser> logUsersRepository,
                        IGenericDataRepository <LogAttachment> logAttachmentRepository)
 {
     _logsRepository          = logsRepository;
     _callLogsRepository      = callLogsRepository;
     _logUsersRepository      = logUsersRepository;
     _logAttachmentRepository = logAttachmentRepository;
 }
Example #23
0
 public InvitesService(IGenericDataRepository <Invite> invitesRepository, IEmailService emailService, IDepartmentsService departmentsService,
                       IUsersService usersService, IUserProfileService userProfileService)
 {
     _invitesRepository  = invitesRepository;
     _emailService       = emailService;
     _departmentsService = departmentsService;
     _usersService       = usersService;
     _userProfileService = userProfileService;
 }
Example #24
0
 public QueueService(IGenericDataRepository <QueueItem> queueItemsRepository, IOutboundQueueProvider outboundQueueProvider, IDepartmentSettingsService departmentSettingsService,
                     IDepartmentsService departmentsService, IGeoLocationProvider geoLocationProvider)
 {
     _queueItemsRepository      = queueItemsRepository;
     _outboundQueueProvider     = outboundQueueProvider;
     _departmentSettingsService = departmentSettingsService;
     _departmentsService        = departmentsService;
     _geoLocationProvider       = geoLocationProvider;
 }
Example #25
0
 public TrainingService(ITrainingRepository trainingRepository, IGenericDataRepository <TrainingAttachment> trainingAttachmentRepository,
                        IGenericDataRepository <TrainingUser> trainingUserRepository, ICommunicationService communicationService, IDepartmentsService departmentService)
 {
     _trainingRepository           = trainingRepository;
     _trainingAttachmentRepository = trainingAttachmentRepository;
     _trainingUserRepository       = trainingUserRepository;
     _communicationService         = communicationService;
     _departmentService            = departmentService;
 }
 public DictionaryController(IGenericCacheRepository <Dictionary> repository, IWorkBenchContext ctx)
 {
     _ctx = ctx ?? new WorkBenchContext();
     if (repository == null)
     {
         _repository = new DictionaryRepository((DbContext)_ctx);
     }
     _repository = repository;
 }
Example #27
0
 public GameRepository(GamesSqlContext context, IMapper mapper, IGenreRepository genreRepository, IPlatformTypeRepository platformRepository, IGenericDataRepository <PublisherEntity, Publisher> publisherRepository, IGenericDataRepository <GameInfoEntity, GameInfo> gameInfoRepository,
                       ICultureRepository cultureRepository) : base(context, mapper)
 {
     _genreRepository     = genreRepository;
     _platformRepository  = platformRepository;
     _publisherRepository = publisherRepository;
     _gameInfoRepository  = gameInfoRepository;
     _cultureRepository   = cultureRepository;
 }
Example #28
0
 public TranslationService(IGenericDataRepository <Language> languageRepository,
                           IGenericDataRepository <Phrase> phraseRepository,
                           IGenericDataRepository <PhraseLanguage> phraseLanguageRepository,
                           string defaultLanguageId)
 {
     _languageRepository       = languageRepository;
     _phraseRepository         = phraseRepository;
     _phraseLanguageRepository = phraseLanguageRepository;
     _defaultLanguageId        = defaultLanguageId;
 }
        public bool DeleteCourse(long id)
        {
            IGenericDataRepository <Course> courseRepo = _uow.RepositoryFor <Course>();
            Course course = new Course();

            course.CourseID    = id;
            course.EntityState = DomainLayer.EntityState.Deleted;
            courseRepo.Remove(course);;
            return(true);
        }
        public bool DeleteDepartment(long id)
        {
            IGenericDataRepository <Department> departmentRepo = _uow.RepositoryFor <Department>();
            Department department = new Department();

            department.DepartmentID = id;
            department.EntityState  = DomainLayer.EntityState.Deleted;
            departmentRepo.Remove(department);;
            return(true);
        }
Example #31
0
        public Student GetStudentByCode(string code)
        {
            SCContext   context = new SCContext(_contextName);
            IUnitOfWork uow     = new UnitOfWork(context);
            IGenericDataRepository <Student> studentRepo = uow.RepositoryFor <Student>();
            var student = studentRepo.GetSingle(p => p.StudentCode.Equals(code));

            uow.Dispose();
            return(student);
        }
        /// <summary>
        ///     Creates a PaymentRepository Object
        /// </summary>
        /// <param name="dataAccess">Instanced <see cref="IGenericDataRepository{T}" /> for <see cref="Payment" /></param>
        /// <param name="recurringDataAccess">
        ///     Instanced <see cref="IGenericDataRepository{T}" /> for <see cref="RecurringPayment" />
        /// </param>
        /// <param name="accountRepository">Instanced <see cref="IAccountRepository" /></param>
        /// <param name="categoryRepository">
        ///     Instanced <see cref="IRepository{T}" /> for <see cref="Category" />
        /// </param>
        public PaymentRepository(IGenericDataRepository<Payment> dataAccess,
            IGenericDataRepository<RecurringPayment> recurringDataAccess,
            IAccountRepository accountRepository,
            IRepository<Category> categoryRepository)
        {
            this.dataAccess = dataAccess;
            this.recurringDataAccess = recurringDataAccess;
            this.accountRepository = accountRepository;
            this.categoryRepository = categoryRepository;

            Data = new ObservableCollection<PaymentViewModel>();
            Load();
        }
Example #33
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApplicationWCF" /> class.
 /// </summary>
 public ApplicationWCF()
 {
     _appRepo = new GenericDataRepository<Application>();
     _appInfoRepo = new GenericDataRepository<ApplicantInfo>();
 }
Example #34
0
 // we need validation for model state see http://www.asp.net/mvc/tutorials/older-versions/models-%28data%29/validating-with-a-service-layer-cs
 public PositionWCF()
 {
     _repository = new GenericDataRepository<Contract>();
 }
 public QuestionnaireService()
 {
     _questionnaireRepository = new GenericDataRepository<Questionnaire>();
     _phoneRepository = new GenericDataRepository<PhoneQuestionnaire>();
 }
 public QuestionnaireService(IGenericDataRepository<Questionnaire> questionnaireRepo,
     IGenericDataRepository<PhoneQuestionnaire> phoneRepo)
 {
     _questionnaireRepository = questionnaireRepo;
     _phoneRepository = phoneRepo;
 }
Example #37
0
 public PositionWCF(IGenericDataRepository<Contract> contractRepo)
 {
     _repository = contractRepo;
 }
Example #38
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApplicationWCF" /> class.
 /// </summary>
 /// <param name="appRepo">     The application repo. </param>
 /// <param name="appInfoRepo"> The application information repo. </param>
 public ApplicationWCF(IGenericDataRepository<Application> appRepo,
     IGenericDataRepository<ApplicantInfo> appInfoRepo)
 {
     _appRepo = appRepo;
     _appInfoRepo = appInfoRepo;
 }