public WarehousesController( WarehouseRepository repository, AddressesRepository addressRepository ) : base(repository) { _repository = repository; _addressRepository = addressRepository; }
public UnitOfWork(OrganizationsContext context, IMapper mapper, IPropertyMappingService propertyMappingService) { _context = context; _mapper = mapper; _propertyMappingService = propertyMappingService; Organizations = new OrganizationsRepository(_context, _mapper, _propertyMappingService); Addresses = new AddressesRepository(_context, _mapper); Phones = new PhonesRepository(_context, _mapper); }
public override void InitParams() { r = new AddressesRepository(_context); dbSet = _context.Addresses; model1 = new Address { ZipCode = 49000, City = "Dnepr", Street = "Lomanaya", StreetKind = "strt", House = "1", Region = "Dneprovskaya" }; model2 = new Address { ZipCode = 49005, City = "Dnepr", Street = "Artyoma", StreetKind = "strt", House = "3", Region = "Dneprovskaya" }; }
public void HelperMethodAddClosingFileAddressAndLocation() { var addressesRepository = new AddressesRepository(_dbConn); addressesRepository.InsertAdress(UserId); AddressId = addressesRepository.GetAddressId(UserId); var locationsRepository = new LocationsRepository(_dbConn); locationsRepository.InsertLocation(CompanyId, AddressId, UserId); LocationId = locationsRepository.GetLocationId(CompanyId, AddressId, UserId); }
/// <summary> /// Konstruktor /// </summary> public FormAdmin() { InitializeComponent(); workersRepository = new WorkersRepository(); studentsRepository = new StudentsRepository(); fieldsOfStudyRepository = new FieldsOfStudiesRepository(); residencePlacesRepository = new AddressesRepository(); studyVintagesRepository = new StudyVintagesRepository(); subjectGroupsRepository = new SubjectGroupsRepository(); subjectsRepository = new SubjectsRepository(); workplacesRepository = new WorkplacesRepository(); }
public SecuredDataService(AccountsRepository accountRepository, AccountUsersRepository accountUserRepository, AccountDestinationsRepository accountDestinationsRepository, AddressesRepository addressesRepository, ContactsRepository contactsRepository, ContactAddressesRepository contactAddressesRepository, MailingListsRepository mailingListsRepository, MailingListContactsRepository mailingListContactsRepository) { _accountRepository = accountRepository; _accountUserRepository = accountUserRepository; _accountDestinationsRepository = accountDestinationsRepository; _addressesRepository = addressesRepository; _contactsRepository = contactsRepository; _contactAddressesRepository = contactAddressesRepository; _mailingListsRepository = mailingListsRepository; _mailingListContactsRepository = mailingListContactsRepository; }
static Unit() { _context = new MyAppDbContext("MyAppConnStr"); AddressesRepository = new AddressesRepository(_context); ClassroomsRepository = new ClassroomsRepository(_context); DepartmentsRepository = new DepartmentsRepository(_context); GroupsRepository = new GroupsRepository(_context); GroupTimetablesRepository = new GroupTimetablesRepository(_context); MarksRepository = new MarksRepository(_context); PairTimetablesRepository = new PairTimetablesRepository(_context); PhonesRepository = new PhonesRepository(_context); SpecialitiesRepository = new SpecialitiesRepository(_context); StudentsRepository = new StudentsRepository(_context); SubjectsRepository = new SubjectsRepository(_context); TeachSubjsRepository = new TeachSubjsRepository(_context); TeachersRepository = new TeachersRepository(_context); TimetablesRepository = new TimetablesRepository(_context); }
public ActionResult UsersUpdate(CounterModel counter) { if (ModelState.IsValid) { using (var db = new GazCountersDbContext()) { var arepo = new AddressesRepository(db); var address = arepo.GetByID(counter.AddressID); if (address == null) throw new Exception("Address ID cant be found in DB, maybe deleted or data is invalid"); counter.AddressData.ToDbAddress(address); arepo.Update(address); arepo.Commit(); } } return null; }
public MatrixManager(DistanceMatrixApi matrixApi, MatrixEntriesRepository matrixRepository, AddressesRepository addressRepository) { _matrixApi = matrixApi; _matrixRepository = matrixRepository; _addressRepository = addressRepository; }
public AddressResolver(AddressesRepository repository) { _repository = repository; }