public HttpResponseMessage Post(service_types model) { try { BOService_types service = new BOService_types(); service_types fileService; fileService = service.SaveService(model); return(Request.CreateResponse(HttpStatusCode.OK, fileService)); } catch (Exception e) { ErrorMessage message = new ErrorMessage("2.1", "Exception to save service type - " + e.GetBaseException().Message, e.ToString()); return(Request.CreateResponse(HttpStatusCode.InternalServerError, message)); } }