public CommandActionResult <CreateNewDojo> Create(CreateSchoolForm form) { var address = new Address { State = form.State, City = form.City, PostalCode = form.PostalCode, Street = form.StreetName, StreetNumber = form.StreetNumber, }; return(Command( new CreateNewDojo(_currentUserProvider.CurrentLoggedInUser().Id, form.Id, form.Name, address, form.Description), () => RedirectToAction("List", "Schools"))); }
public ActionResult Create() { var model = new CreateSchoolForm(); return(ContextualView(model)); }