public async Task <ActionResult> Create(Models.Address address) { if (ModelState.IsValid) { address.CustomerId = User.Identity.GetUserId(); address.Id = Guid.NewGuid(); await _address.AddAddress(address); return(RedirectToAction("Index")); } return(View(address)); }
public IActionResult FulfillAddress(AddressIndexListingModel model, int OrderId) { Console.WriteLine(" ????????????????????PONEIJZS???????????????????????????????//// "); Address address = new Address() { Street = model.Street, StreetNumber = model.StreetNumber, AppartmentNumber = model.AppartmentNumber, PostCode = model.PostCode, City = model.City, Country = model.Country }; _address.AddAddress(address); _address.AddAddressToOrder(address.Id, OrderId); return(RedirectToAction("FulfillClient", "Client", new { OrderId = OrderId })); //return View(); }
public void AddAddress(Address address) { iaddress.AddAddress(address); }