public void Dispose() { if (Context != null) { Context.Dispose(); Context = null; } }
public UnitOfWork() { context = new BanquetDbContext(); }
/// <summary> /// Public Constructor,initializes privately declared local variables. /// </summary> /// <param name="context"></param> public GenericRepository(BanquetDbContext context) { this.Context = context; context.Configuration.ProxyCreationEnabled = false; this.DbSet = context.Set <TEntity>(); }