public LogAuditoria(string identifier, string message, string detail, LogSourceEnum source, LogTypeEnum type) { Id = Guid.NewGuid(); Identifier = identifier; Message = message; Detail = detail; Source = source.ToString(); Type = type.ToString(); Data = DateTime.Now; }
public async Task <Guid> SaveAuditAsync(string identifier, string message, string detail, LogSourceEnum source, LogTypeEnum type) { var model = new LogAuditoria(identifier, message, detail, source, type); await _logAudit.AddAsync(model); return(model.Id); }
public static LogAuditoria NewLogAuditoriaFull(string identifier, string message, string detail, LogSourceEnum source, LogTypeEnum type, string user, string hostname, string url, string controller, string method, int statusCode, string cookies, string serverVariables) { var logAudit = new LogAuditoria() { Id = Guid.NewGuid(), Data = DateTime.Now, Identifier = identifier, Message = message, Detail = detail, Source = source.ToString(), Type = type.ToString(), User = user, Hostname = hostname, Url = url, Controller = controller, Method = method, StatusCode = statusCode, Cookies = cookies, ServerVariables = serverVariables }; return(logAudit); }