dynamic GetAllDistricts(IDistrictsRepository districtsRepository) { var command = new GetAllDistrictsCommand(districtsRepository); var vm = command.Execute(); return(View["districts", vm]); }
public DistrictsService(VirtualBankDbContext dbContext, IDistrictsRepository districtsRepo, IHttpContextAccessor httpContextAccessor) { _dbContext = dbContext; _districtsRepo = districtsRepo; _httpContextAccessor = httpContextAccessor; }
public Program() { var client = new MongoClient(); var db = "kulepool"; _districtsRepo = new DistrictsRepository(client, db); _schoolsRepo = new SchoolsRepository(client, db); _studentsRepo = new StudentsRepository(client, db); }
/// <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; }
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]); }
public DistrictsService(IDistrictsRepository districtsRepository) { DistrictsRepository = districtsRepository; }
public GetAllDistrictsCommand(IDistrictsRepository districtsRepository) { this.districtsRepository = districtsRepository; }
public DistrictsManagement(IDistrictsRepository districtsRepository) { _districtsRepository = districtsRepository; }
public DistrictsController(IDistrictsRepository repository) { _repository = repository; }
public GetDistrictCommand(IDistrictsRepository districtsRepository, ISchoolsRepository schoolsRepository) { this.districtsRepository = districtsRepository; this.schoolsRepository = schoolsRepository; }