예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EntityRepository{T}"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public EntityRepository(CodeCampDbContext context)
 {
     Context = context;
     Table   = context.Set <T>();
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EntityRepository{T}"/> class.
 /// </summary>
 public EntityRepository()
 {
     Context = new CodeCampDbContext();
     Table   = Context.Set <T>();
 }