Пример #1
0
 public int Delete(int id, byte[] timeStamp)
 {
     _db.Entry(new T()
     {
         Id = id, Timestamp = timeStamp
     }).State = EntityState.Deleted;
     return(SaveChanges());
 }
Пример #2
0
 public int Delete(T entity)
 {
     _db.Entry(entity).State = EntityState.Deleted;
     return(SaveChanges());
 }