public bool Save(EmploymentPapersUploadVModel Model, int CompanyId, string UserName, string Culture, out string ErrorMessage, out int CurrentEmpStatus, out int OldEmpStatus) { OldEmpStatus = 0; CurrentEmpStatus = 0; ErrorMessage = string.Empty; List <Error> errors = new List <Error>(); try { CompanyDocsViews doc = Save_CompanyDocsViews(Model, UserName, Culture, CompanyId, out CurrentEmpStatus, out OldEmpStatus); SaveGrid_Section(Model, Culture, doc); errors = hrUnitOfWork.SaveChanges(); if (errors.Count() > 0) { ErrorMessage = errors.First().errors.First().message; return(false); } return(true); } catch (Exception ex) { ErrorMessage = ex.Message; return(false); } // } }