public UnitOfWork(bbuContext context) { _context = context; Addresses = new AddressRepository(_context); AppUsers = new AppUserRepository(_context); Banks = new BankRepository(_context); BankAccounts = new BankAccountRepository(_context); Cemeteries = new CemeteryRepository(_context); Credentials = new CredentialsRepository(_context); Deceaseds = new DeceasedRepository(_context); Doctors = new DoctorRepository(_context); Employees = new EmployeeRepository(_context); Files = new FileRepository(_context); Funerals = new FuneralRepository(_context); FuneralDocuments = new FuneralDocumentRepository(_context); Genders = new GenderRepository(_context); HomeAffairsOffices = new HomeAffairsOfficeRepository(_context); HomeAffairsOfficers = new HomeAffairsOfficerRepository(_context); Hospitals = new HospitalRepository(_context); Informants = new InformantRepository(_context); Members = new MemberRepository(_context); Months = new MonthRepository(_context); Mortuaries = new MortuaryRepository(_context); NextOfKins = new NextOfKinRepository(_context); NumberConfigurations = new NumberConfigurationRepository(_context); Payments = new PaymentRepository(_context); PaymentPeriods = new PaymentPeriodRepository(_context); People = new PersonRepository(_context); PurchaseItems = new PurchaseItemRepository(_context); Settings = new SettingRepository(_context); States = new StateRepository(_context); Suppliers = new SupplierRepository(_context); Tasks = new TaskRepository(_context); Years = new YearRepository(_context); }
public Funeral getByID(string id) { try { Funeral funeral = null; using (ApplicationDbContext dbContext = new ApplicationDbContext()) { funeral = new FuneralRepository(dbContext).getByID(id); } return(funeral); } catch (Exception ex) { } return(null); }
public List <Funeral> getAll() { try { List <Funeral> listFuneral = new List <Funeral>(); using (ApplicationDbContext db = new ApplicationDbContext()) { listFuneral = new FuneralRepository(db).getAll(); } return(listFuneral); } catch (Exception ex) { } return(new List <Funeral>()); }
public MorgueController(IMapper mapper, RegisterCardForMorgueRepository registerCardForMorgueRepository, ForensicReportRepository forensicReportRepository, BodyIdentificationReportRepository bodyIdentificationReportRepository, CitizenUserRepository citizenUserRepository, UserService userService, RitualServiceRepository ritualServiceRepository, IWebHostEnvironment hostEnvironment, FuneralRepository funeralRepository, ContentForMorgueRepository contentForMorgueRepository) { this.registerCardForMorgueRepository = registerCardForMorgueRepository; this.mapper = mapper; this.forensicReportRepository = forensicReportRepository; this.bodyIdentificationReportRepository = bodyIdentificationReportRepository; this.citizenUserRepository = citizenUserRepository; this.userService = userService; this.ritualServiceRepository = ritualServiceRepository; this.hostEnvironment = hostEnvironment; this.funeralRepository = funeralRepository; this.contentForMorgueRepository = contentForMorgueRepository; }