Exemplo n.º 1
0
 internal Task <AppEvent[]> RetrieveByRequest(AppRequest request)
 {
     return(factory.DB.Events.Retrieve()
            .Where(e => e.RequestID == request.ID.Value)
            .Select(e => factory.Event(e))
            .ToArrayAsync());
 }
Exemplo n.º 2
0
        public async Task <AppEvent> LogEvent(AppRequest request, string eventKey, DateTimeOffset timeOccurred, AppEventSeverity severity, string caption, string message, string detail)
        {
            var record = new AppEventRecord
            {
                RequestID    = request.ID.Value,
                EventKey     = eventKey,
                TimeOccurred = timeOccurred,
                Severity     = severity.Value,
                Caption      = caption,
                Message      = message,
                Detail       = detail
            };
            await factory.DB.Events.Create(record);

            return(factory.Event(record));
        }