public List <CemeteryStaffPerson> getBy(Func <CemeteryStaffPerson, bool> whereClausule) { try { List <CemeteryStaffPerson> listCemeteryStaffPerson = new List <CemeteryStaffPerson>(); using (ApplicationDbContext dbContext = new ApplicationDbContext()) { listCemeteryStaffPerson = new CemeteryStaffPersonRepository(dbContext).getBy(whereClausule); } return(listCemeteryStaffPerson); } catch (Exception ex) { } return(new List <CemeteryStaffPerson>()); }
public CemeteryStaffPerson getByID(string id) { try { CemeteryStaffPerson cemeteryStaffPerson = null; using (ApplicationDbContext dbContext = new ApplicationDbContext()) { cemeteryStaffPerson = new CemeteryStaffPersonRepository(dbContext).getByID(id); } return(cemeteryStaffPerson); } catch (Exception ex) { } return(null); }
public List <CemeteryStaffPerson> getAll() { try { List <CemeteryStaffPerson> listCemeteryStaffPerson = new List <CemeteryStaffPerson>(); using (ApplicationDbContext dbContext = new ApplicationDbContext()) { listCemeteryStaffPerson = new CemeteryStaffPersonRepository(dbContext).getAll(); } return(listCemeteryStaffPerson); } catch (Exception ex) { } return(new List <CemeteryStaffPerson>()); }