예제 #1
0
        public static bool Delete(ConfigMercadoLocal ObjectToDelete)
        {
            try
            {
                using (var ctx = new SuchDBContext())
                {
                    ctx.ConfigMercadoLocal.Remove(ObjectToDelete);
                    ctx.SaveChanges();
                }

                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }
예제 #2
0
        public static ConfigMercadoLocal Update(ConfigMercadoLocal ObjectToUpdate)
        {
            try
            {
                using (var ctx = new SuchDBContext())
                {
                    ctx.ConfigMercadoLocal.Update(ObjectToUpdate);
                    ctx.SaveChanges();
                }

                return(ObjectToUpdate);
            }
            catch (Exception e)
            {
                return(null);
            }
        }