public void Delete(Mortes mortes) { try { if (mortes != null) { _context.Remove(mortes); _context.SaveChanges(); } } catch (Exception ex) { throw new Exception(ex.Message); } }
public void Add(Mortes mortes) { try { if (mortes != null) { if (mortes.Id == 0) { _context.Add(mortes); _context.SaveChanges(); } } } catch (Exception ex) { throw new Exception(ex.Message); } }