Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 public async Task Insert([FromBody] UserStatus userStatus)
 {
     await userStatusService.InsertAsync(userStatus);
 }