public ActionResult AddEmployee(AddEmployeeModel model) { if (ModelState.IsValid) { _companyService.AddEmploee(model.CompanyId, new Employee() { Email = model.Email, FirstName = model.Name, LastName = model.LastName, Password = model.Password, Id = Guid.NewGuid() }); return(RedirectToAction("IndexPage", new { id = model.CompanyId })); } else { return(RedirectToAction("AddEmployee", new { id = model.CompanyId })); } }