public bool Delete(int id) { try { T obj = _dbset.Find(id); _context.Set <T>().Remove(obj); Save(); return(true); } catch (Exception) { return(false); } }
public BaseRepository(ISchoolContextt context) { _context = context; _dbset = _context.Set <T>(); }