コード例 #1
0
 public WarehousesController(
     WarehouseRepository repository,
     AddressesRepository addressRepository
     ) : base(repository)
 {
     _repository        = repository;
     _addressRepository = addressRepository;
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 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"
     };
 }
コード例 #4
0
        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);
        }
コード例 #5
0
 /// <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();
 }
コード例 #6
0
 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;
 }
コード例 #7
0
 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;
 }
コード例 #8
0
 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);
 }
コード例 #9
0
        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;
        }
コード例 #10
0
 public MatrixManager(DistanceMatrixApi matrixApi, MatrixEntriesRepository matrixRepository, AddressesRepository addressRepository)
 {
     _matrixApi         = matrixApi;
     _matrixRepository  = matrixRepository;
     _addressRepository = addressRepository;
 }
コード例 #11
0
 public MatrixManager(DistanceMatrixApi matrixApi, MatrixEntriesRepository matrixRepository, AddressesRepository addressRepository)
 {
     _matrixApi = matrixApi;
     _matrixRepository = matrixRepository;
     _addressRepository = addressRepository;
 }
コード例 #12
0
 public AddressResolver(AddressesRepository repository)
 {
     _repository = repository;
 }