Exemplo n.º 1
0
 /// <summary>
 /// Disposes all external resources.
 /// </summary>
 /// <param name="disposing">The dispose indicator.</param>
 private void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             if (_dbContext != null)
             {
                 _dbContext.Dispose();
                 _dbContext = null;
             }
         }
     }
     disposed = true;
 }
 public TestEntityRepository(IFoodNetworkDatabaseContext context)
     : base(context)
 {
 }
 public RestaurantRepository(IFoodNetworkDatabaseContext dbcontext)
     : base(dbcontext)
 {
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the UnitOfWork class.
 /// </summary>
 /// <param name="context">The object context</param>
 public UnitOfWork(IFoodNetworkDatabaseContext context)
 {
     // var factory = new FoodNetworkDataBaseConnectionFactory(connectionBuilder);
     _dbContext = context;
 }
Exemplo n.º 5
0
 public BaseRepository(IFoodNetworkDatabaseContext context)
 {
     _dbContext = context;
 }