コード例 #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="GenericRepository{T}" /> class.
 /// </summary>
 /// <param name="context">The context for the repository</param>
 public GenericRepository(OneStopGamingEntities context)
 {
     _context = context;
     _dbSet   = _context.Set <T>();
 }
コード例 #2
0
 //Method to create the database context
 public UnitOfWork()
 {
     //Create the database Context
     _context = new OneStopGamingEntities();
 }