예제 #1
0
 private async Task StartupEventAsync(StartupEvent evt)
 {
     using (EventsDatabaseContext context = new EventsDatabaseContext()) {
         context.StartupEvents.Add(evt);
         await context.SaveChangesAsync().ConfigureAwait(false);
     }
 }
예제 #2
0
 private async Task AuthenticateEventAsync(AuthenticateEvent evt)
 {
     using (EventsDatabaseContext context = new EventsDatabaseContext()) {
         context.AuthenticationEvents.Add(evt);
         await context.SaveChangesAsync().ConfigureAwait(false);
     }
 }