Exemple #1
0
 public void Update(UserFavoriteResult result)
 {
     context.Entry(result).State = result.Id == 0
         ? System.Data.Entity.EntityState.Added
         : System.Data.Entity.EntityState.Modified;
     context.SaveChanges();
 }
Exemple #2
0
 public void Delete(UserFavoriteResult result)
 {
     context.Entry(result).State = System.Data.Entity.EntityState.Deleted;
     context.SaveChanges();
 }