public int Update(LiveMedsEntity.Category value)
 {
     return(this.data.Update(value));
 }
 public int Insert(LiveMedsEntity.Category value)
 {
     return(this.data.Insert(value));
 }
Exemple #3
0
 public int Update(LiveMedsEntity.Category value)
 {
     LiveMedsEntity.Category ctg = this.context.Categories.SingleOrDefault(a => a.CategoryId == value.CategoryId);
     ctg.CategoryName = value.CategoryName;
     return(this.context.SaveChanges());
 }
Exemple #4
0
 public int Delete(int id)
 {
     LiveMedsEntity.Category ctg = this.context.Categories.SingleOrDefault(a => a.CategoryId == id);
     this.context.Categories.Remove(ctg);
     return(this.context.SaveChanges());
 }
Exemple #5
0
 public int Insert(LiveMedsEntity.Category value)
 {
     this.context.Categories.Add(value);
     return(this.context.SaveChanges());
 }