public void Update(InventarioConfig config) { using (var ctx = new Context.Context()) { ctx.Entry(config).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); } }
public InventarioConfig GetByID(int id) { InventarioConfig config = null; using (var ctx = new Context.Context()) { config = ctx.InventarioConfigs.Where(x => x.ID == id).SingleOrDefault(); } return(config); }