Ejemplo n.º 1
0
        public bool Update(Customers customer)
        {
            try
            {
                //var entry = _ctx.Entry(product);
                //customer.CustomerID = CustomerID;
                _ctx.Set<Customers>().Attach(customer);
                _ctx.Entry(customer).State = EntityState.Modified;
                return true;

            }
            catch
            {

                return false;
            }
        }
Ejemplo n.º 2
0
        public bool Insert(Customers customer)
        {
            try
            {
                _ctx.Customers.Add(customer);
                return true;
            }
            catch
            {

                return false;
            }
        }