Exemplo n.º 1
0
 public void Delete(TEntity entityToDelete)
 {
     if (context.Entry(entityToDelete).State == EntityState.Detached)
     {
         dbSet.Attach(entityToDelete);
     }
     dbSet.Remove(entityToDelete);
 }
Exemplo n.º 2
0
 public void UpdateGoat(Models.Goat goat)
 {
     context.Entry(goat).State = EntityState.Modified;
 }