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