/// <summary>
 /// Initializes a new instance of the <see cref="GenericRepository{T}"/> class.
 /// </summary>
 public GenericRepository()
 {
     if (_dataContextFactory == null)
     {
         _dataContextFactory = new NationalCriminalDataContext();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Disposes all external resources.
 /// </summary>
 /// <param name="disposing">The dispose indicator.</param>
 private void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_dbContext != null)
         {
             _dbContext.Dispose();
             _dbContext = null;
         }
     }
 }