public string UpdateGLRestTime(dynamic values) { GL_RestTimeDTO dto = JsonConvert.DeserializeObject <GL_RestTimeDTO>(values.ToString()); string errorMessage = _goldenLineService.UpdateRestTime(dto, out errorMessage); return(errorMessage); }
public string UpdateRestTime(GL_RestTimeDTO dto, out string errorMessage) { errorMessage = string.Empty; GL_Rest entity = AutoMapper.Mapper.Map <GL_Rest>(dto); try { GL_RestRepository.Update(entity); _unitOfWork.Commit(); return(""); } catch (Exception ex) { // errorMessage = ex.Message; return(ex.Message);; } }