public async Task <PECMailLog> CreatePECMailLogAsync(PECMailLog pecMailLog) { try { return(await _webApiClient.PostEntityAsync(pecMailLog)); } catch (Exception ex) { _logger.WriteError(ex, LogCategories); throw ex; } }
public void CreatPECMailLog(PECMail pecMail, string logType, string logDescription) { PECMailLog pecMailLog = new PECMailLog() { LogDate = DateTime.UtcNow, LogType = logType, Description = logDescription, SystemComputer = Environment.MachineName, PECMail = pecMail, RegistrationUser = CurrentDomainUser.Account, }; pecMailLog.Hash = HashGenerator.GenerateHash(string.Concat(pecMailLog.RegistrationUser, "|", pecMailLog.SystemComputer, "|", pecMailLog.LogType, "|", pecMailLog.Description, "|", pecMailLog.UniqueId, "|", pecMailLog.PECMail.EntityId, "|", pecMailLog.LogDate.ToString("yyyyMMddHHmmss"))); _unitOfWork.Repository<PECMailLog>().Insert(pecMailLog); }