public AAASIncident GetById(int id) { try { using (AAASIncidentRepository AIRepo = new AAASIncidentRepository()) { AAASIncident AIModel = new AAASIncident(); { AIModel = AIRepo.Get <AAASIncident>(id); return(AIModel); } } } catch (Exception ex) { throw ex; } }
public bool Delete(int id) { try { using (AAASIncidentRepository AIRepo = new AAASIncidentRepository()) { var AIExisting = AIRepo.Get <AAASIncident>(id); if (AIExisting == null) { return(false); } else { AIRepo.Delete <AAASIncident>(id); return(true); } } } catch (Exception ex) { throw ex; } }