예제 #1
0
 public int Update(T entity)
 {
     using (var dbContext = new WebContextDataBase())
     {
         dbContext.Entry(entity).State = EntityState.Modified;
         return(dbContext.SaveChanges());
     }
 }
예제 #2
0
 public int Delete(T entity)
 {
     using (var dbContext = new WebContextDataBase())
     {
         dbContext.Entry(entity).State = EntityState.Deleted;
         return(dbContext.SaveChanges());
     }
     throw new NotImplementedException();
 }