public async Task <IActionResult> Create(AdminUserStatusCreateViewModel viewModel) { if (ModelState.IsValid) { UserStatus userStatus = new UserStatus { Name = viewModel.Name }; await userStatusService.InsertAsync(userStatus); return(RedirectToAction("Index")); } return(View(viewModel)); }
public async Task Insert([FromBody] UserStatus userStatus) { await userStatusService.InsertAsync(userStatus); }