Beispiel #1
0
        public async Task <ActionResult> Create(EmployeeModel employee)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    bool flag = await _employeeService.AddOrUpdateEmployee(employee);

                    if (flag)
                    {
                        return(RedirectToAction("Index"));
                    }
                }
            }
            catch
            {
                return(View());
            }
            return(View());
        }