public async Task <IActionResult> Register(OrganizationViewModel model) { if (!ModelState.IsValid) { return(View(await InitializeViewModel(model))); } var result = await _orgService.AddOrganizationAsync(model.ToOrganizationDetail()); if (!result.IsSuccess) { ModelState.AddModelError("", result.Error); return(View(await InitializeViewModel(model))); } return(RedirectToAction("Index", "Home")); }