public AmplifyingReportView GetById(int id) { try { using (AmplifyingReportRepository ARRepo = new AmplifyingReportRepository()) { AmplifyingReportView ARViewModel = new AmplifyingReportView(); { ARViewModel = ARRepo.Get <AmplifyingReportView>(id); return(ARViewModel); } } } catch (Exception ex) { throw ex; } }
public bool Delete(int id) { try { using (AmplifyingReportRepository ARRepo = new AmplifyingReportRepository()) { var ARExisting = ARRepo.Get <AmplifyingReport>(id); if (ARExisting == null) { return(false); } else { ARRepo.Delete <AmplifyingReport>(id); return(true); } } } catch (Exception ex) { throw ex; } }