Exemplo n.º 1
0
        public override void OnActionExecuted(ActionExecutedContext context)
        {
            IRepository repository = context.HttpContext.RequestServices.GetService <IRepository>();

            AuditLogMessage message = new AuditLogMessage(_action, context.HttpContext.Connection.RemoteIpAddress.ToString(), AuditLogMessage.MessageType.completed);

            repository.RecordAuditMessage(message);
        }
Exemplo n.º 2
0
		public async Task RecordAuditMessage(AuditLogMessage message) {
			messages.Add(message);
		}
 public Task RecordAuditMessage(AuditLogMessage message)
 {
     return(LogMessages.InsertOneAsync(message));
 }