Example #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (!disposedValue && dbContext != null)
     {
         dbContext.Dispose();
         dbContext     = null;
         disposedValue = true;
     }
 }
Example #2
0
 public StoriesDbContext InitContext()
 {
     return(dbContext ?? (dbContext = new StoriesDbContext()));
 }