Exemple #1
0
 public void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (context != null)
         {
             context.Dispose();
             context = null;
         }
     }
 }
Exemple #2
0
        //internal DbSet<TEntity> _dbset;
        #endregion

        #region Public Constructor...
        /// <summary>
        /// Public Constructor,initializes privately declared local variables.
        /// </summary>
        /// <param name="context"></param>

        public GenericRepository(IUnityOfWork unitOfWork)
        {
            this._context = unitOfWork.DbContext;
            //this._dbset = context.Set<TEntity>();
        }