コード例 #1
0
 /// <summary>
 /// Creates a new instance of <see cref="GenericRepository{TEntity}"/>
 /// </summary>
 /// <param name="context">Context</param>
 public GenericRepository(SmogDetectorModel context)
 {
     Context = context;
     DbSet   = context.Set <TEntity>();
 }
コード例 #2
0
 /// <summary>
 /// Creates a new instance of <see cref="GenericRepository{TEntity}"/>
 /// </summary>
 public GenericRepository()
 {
     Context = new SmogDetectorModel();
     DbSet   = Context.Set <TEntity>();
 }