// DELETE api/employeedetails/5 public bool Delete(int id) { try { return(BLLEmployeeDetails.Delete(id)); } catch (Exception ex) { return(false); } }
// POST api/employeedetails public string Post([FromBody] BOEmployeeDetails employeeDetails) { try { //TODO : Need to verify Insert and Update int id = employeeDetails != null ? employeeDetails.EmployeeID : 0; int ret = BLLEmployeeDetails.Save(employeeDetails, id > 0 ? false : true); return(ret > 0 ? "Record saved successfully" : "There is a problem while saving record"); } catch (Exception ex) { return(ex.Message); } }