Beispiel #1
0
 public BaseRepository(AspNetWebDemoDbEntities context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("DB Context is null.");
     }
     _context = context;
 }
Beispiel #2
0
 protected virtual void Dispose(bool isDisposing)
 {
     if (isDisposing)
     {
         if (_context != null)
         {
             _context.Dispose();
             _context = null;
         }
     }
 }