Esempio n. 1
0
        dynamic GetAllDistricts(IDistrictsRepository districtsRepository)
        {
            var command = new GetAllDistrictsCommand(districtsRepository);
            var vm      = command.Execute();

            return(View["districts", vm]);
        }
Esempio n. 2
0
 public DistrictsService(VirtualBankDbContext dbContext,
                         IDistrictsRepository districtsRepo,
                         IHttpContextAccessor httpContextAccessor)
 {
     _dbContext           = dbContext;
     _districtsRepo       = districtsRepo;
     _httpContextAccessor = httpContextAccessor;
 }
Esempio n. 3
0
 public Program()
 {
     var client = new MongoClient();
     var db = "kulepool";
     _districtsRepo = new DistrictsRepository(client, db);
     _schoolsRepo = new SchoolsRepository(client, db);
     _studentsRepo = new StudentsRepository(client, db);
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of
 /// type DistrictsService.
 /// </summary>
 /// <param name="DistrictsRepository"></param>
 /// <param name="unitOfWork"></param>
 public DistrictsService(
     IDistrictsRepository DistrictsRepository,
     ILanguageService languageService,
     IUnitOfWork unitOfWork)
 {
     this._DistrictsRepository = DistrictsRepository;
     this._languageService     = languageService;
     this._unitOfWork          = unitOfWork;
 }
        public AdressProvider()
        {
            EFContext context = new EFContext();


            _citiesRepository     = new CitiesRepository(context);
            _districtsRepository  = new DistrictsRepository(context);
            _streetsRepository    = new StreetsRepository(context);
            _numberHomeRepository = new NumberHomeRepository(context);
            _roomsRepository      = new RoomsRepository(context);
        }
 public BeginningConfig(IProvincesRepository provincesRepository, ICantonsRepository cantonsRepository, IDistrictsRepository districtsRepository, 
     ICompaniesRepository companiesRepository, IStoresRepository storesRepository, IRelationshipTypesRepository relationshipTypesRepository, 
     IRolesRepository rolesRepository, IIdentificationTypesRepository identificationTypesRepository, IUsersRepository usersRepository)
 {
     _provincesRepository = provincesRepository;
     _cantonsRepository = cantonsRepository;
     _districtsRepository = districtsRepository;
     _companiesRepository = companiesRepository;
     _storesRepository = storesRepository;
     _relationshipTypesRepository = relationshipTypesRepository;
     _rolesRepository = rolesRepository;
     _identificationTypesRepository = identificationTypesRepository;
     _usersRepository = usersRepository;
 }
 public BeginningConfig(IProvincesRepository provincesRepository, ICantonsRepository cantonsRepository, IDistrictsRepository districtsRepository,
                        ICompaniesRepository companiesRepository, IStoresRepository storesRepository, IRelationshipTypesRepository relationshipTypesRepository,
                        IRolesRepository rolesRepository, IIdentificationTypesRepository identificationTypesRepository, IUsersRepository usersRepository)
 {
     _provincesRepository           = provincesRepository;
     _cantonsRepository             = cantonsRepository;
     _districtsRepository           = districtsRepository;
     _companiesRepository           = companiesRepository;
     _storesRepository              = storesRepository;
     _relationshipTypesRepository   = relationshipTypesRepository;
     _rolesRepository               = rolesRepository;
     _identificationTypesRepository = identificationTypesRepository;
     _usersRepository               = usersRepository;
 }
Esempio n. 8
0
        dynamic GetDistrict(IDistrictsRepository districtsRepository, ISchoolsRepository schoolsRepository, dynamic parameters)
        {
            string idAsString = parameters.districtId;

            Guid districtId;

            if (!Guid.TryParse(idAsString, out districtId))
            {
                return(Response.AsJson(new { Error = $"Invalid district id '{idAsString}'" }, HttpStatusCode.BadRequest));
            }

            var command = new GetDistrictCommand(districtsRepository, schoolsRepository);
            var vm      = command.Execute(districtId);

            return(View["schools", vm]);
        }
Esempio n. 9
0
 public DistrictsService(IDistrictsRepository districtsRepository)
 {
     DistrictsRepository = districtsRepository;
 }
Esempio n. 10
0
 public GetAllDistrictsCommand(IDistrictsRepository districtsRepository)
 {
     this.districtsRepository = districtsRepository;
 }
 public DistrictsManagement(IDistrictsRepository districtsRepository)
 {
     _districtsRepository = districtsRepository;
 }
Esempio n. 12
0
 public DistrictsController(IDistrictsRepository repository)
 {
     _repository = repository;
 }
 public DistrictsManagement(IDistrictsRepository districtsRepository)
 {
     _districtsRepository = districtsRepository;
 }
Esempio n. 14
0
 public GetDistrictCommand(IDistrictsRepository districtsRepository, ISchoolsRepository schoolsRepository)
 {
     this.districtsRepository = districtsRepository;
     this.schoolsRepository   = schoolsRepository;
 }