예제 #1
0
        public void EditAddress(EditAddressBM bind)
        {
            Address address = Context.Addresses.Find(bind.Id);

            address.City        = bind.City;
            address.Streat      = bind.Streat;
            address.PostCode    = bind.PostCode;
            address.PhoneNumber = bind.PhoneNumber;
            Context.SaveChanges();
        }
예제 #2
0
        public ActionResult Edit([Bind(Include = "Id, City, Streat, PhoneNumber, PostCode")] EditAddressBM bind)
        {
            if (this.ModelState.IsValid)
            {
                service.EditAddress(bind);

                return(this.RedirectToAction("MyAddresses"));
            }

            return(View());
        }