public ActionResult Create(Employee employee, HttpPostedFileBase image) { if (ModelState.IsValid) { employee.CreateFileForContainer(image); _repository.CreateEmployee(employee); TempData.AddMessage(MessageType.Success, string.Format(GlobalRes.EmployeeSavedMsg, employee.FullName)); _logger.Info("Employee \"{0}\" created by {1}.", employee.FullName, User.Identity.Name); return RedirectToAction(nameof(Table), new { area = "Admin" }); } else { // there is something wrong with the data values return View("CreateEmployee", employee); } }