예제 #1
0
        public bool DeleteDAddress(console.Models.tbl_DelivetyAddresses entity)
        {
            bool result = false;

            using (var context = new console.Models.dream_techContext())
            {
                context.tbl_DelivetyAddresses.Remove(entity);
                result = context.SaveChanges() > 1;
            }
            return(result);
        }
예제 #2
0
        public bool UpdateDAddress(console.Models.tbl_DelivetyAddresses entity)
        {
            bool result = false;

            using (var context = new console.Models.dream_techContext())
            {
                tbl_DelivetyAddresses address = (from d in context.tbl_DelivetyAddresses where d.delivery_id == entity.delivery_id select d).First();

                address.address_line = entity.address_line;
                address.suburb       = entity.suburb;
                address.city         = entity.city;
                address.postal_code  = entity.postal_code;
                address.country_id   = entity.country_id;

                result = context.SaveChanges() > 1;
            }
            return(result);
        }