// GET: Listing public async Task <ActionResult> Create(String id) { if (String.IsNullOrEmpty(id)) { id = "colu"; } Models.Listing listing = new Models.Listing(); if (id == "colu") { Clients.IAddressClient client = Factory.GetAddressClient(id); listing.AssetAddress = await client.GetAddressAsync(); } return(View(listing)); }
public async Task <ActionResult> Create(Models.Listing model) { ListingRepository.Add(model); return(RedirectToAction("Index")); }