コード例 #1
0
        public GenericRepository()
        {
            var db = new tourdulichEntities();

            _context = new tourdulichEntities();
            dbSet    = _context.Set <T>();
        }
コード例 #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_context != null)
         {
             _context.Dispose();
             _context = null;
         }
     }
 }
コード例 #3
0
 public GenericRepository(tourdulichEntities context)
 {
     _context = context;
     dbSet    = _context.Set <T>();
 }