public ActionResult UpdateEmployeeDetail([FromRoute] int ID, [FromBody] UpdateModel Info) { try { var response = BusinessLayer.UpdateEmployeeDetails(ID, Info); if (!response.Equals(null)) { var Status = "Success"; var Message = "Employee Data Updated Sucessfully"; return(this.Ok(new { Status, Message, data = Info })); } else { var status = "Unsuccess"; var Message = "Employee Data not Updated"; return(this.BadRequest(new { status, Message, data = Info })); } } catch (Exception exception) { return(BadRequest(new { error = exception.Message })); } }