public ActionResult AddorUpdate(Employee employee) { //EmployeeViewModel empViewModel = new EmployeeViewModel(); if (employee.Id != 0) { client.UpdateEmployee(employee); } else { client.InsertEmployee(employee); } return(Json(new { status = "Success" }, JsonRequestBehavior.AllowGet)); }