public int Update(LiveMedsEntity.Category value) { return(this.data.Update(value)); }
public int Insert(LiveMedsEntity.Category value) { return(this.data.Insert(value)); }
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()); }
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()); }
public int Insert(LiveMedsEntity.Category value) { this.context.Categories.Add(value); return(this.context.SaveChanges()); }