public async Task <IActionResult> Create() { var model = new ServiceCreateInputModel { Types = await this.serviceService.GetAllTypesAsync() as ICollection <string>, }; return(this.View(model)); }
public async Task <IActionResult> Create(ServiceCreateInputModel model) { if (!this.ModelState.IsValid) { return(this.View(model)); } await this.serviceService.CreateAsync <ServiceCreateInputModel>(model); return(this.Redirect("/Home/Index")); }