예제 #1
0
 public Employee(EmployeeDetailsViewModel employee)
 {
     Id      = employee.Id;
     Name    = employee.Name;
     Gender  = employee.Gender;
     State   = employee.State;
     City    = employee.City;
     Pincode = employee.Pincode;
 }
예제 #2
0
        public ActionResult Create(EmployeeDetailsViewModel employeeModel)
        {
            try
            {
                // TODO: Add insert logic here
                Employee employee = new Employee(employeeModel);
                Employee.Add(employee);

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