public int Update(LiveMedsEntity.Manufacturer value) { LiveMedsEntity.Manufacturer mn = this.context.Manufactureres.SingleOrDefault(m => m.ManufacturerId == value.ManufacturerId); mn.ManufactureName = value.ManufactureName; mn.Products = mn.Products; return(this.context.SaveChanges()); }
public int Update(LiveMedsEntity.Manufacturer m) { return(this.data.Update(m)); }
public int Insert(LiveMedsEntity.Manufacturer m) { return(this.data.Insert(m)); }
public int Delete(int id) { LiveMedsEntity.Manufacturer mn = this.context.Manufactureres.SingleOrDefault(m => m.ManufacturerId == id); this.context.Manufactureres.Remove(mn); return(this.context.SaveChanges()); }
public int Insert(LiveMedsEntity.Manufacturer value) { this.context.Manufactureres.Add(value); return(this.context.SaveChanges()); }