コード例 #1
0
        public async Task <IActionResult> Create([Bind("EmployeeId,FirstName,LastName,CreatedOn,UpdatedOn")] Employee employee)
        {
            if (ModelState.IsValid)
            {
                await _repository.CreateNewEmployee(employee);

                return(RedirectToAction(nameof(Index)));
            }
            return(View(employee));
        }