예제 #1
0
 public void Update(InventarioConfig config)
 {
     using (var ctx = new Context.Context())
     {
         ctx.Entry(config).State = System.Data.Entity.EntityState.Modified;
         ctx.SaveChanges();
     }
 }
예제 #2
0
        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);
        }