Example #1
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));
        }
Example #2
0
 internal AppEvent Event(AppEventRecord record) => new AppEvent(record);
Example #3
0
 internal AppEvent(AppEventRecord record)
 {
     this.record = record ?? new AppEventRecord();
     ID          = new EntityID(this.record.ID);
 }