コード例 #1
0
        public GenericRepository(PhotoGalleryDbContext context)
        {
            if (context == null)
            {
                throw new ArgumentException("An instance of DbContext is required to use this repository.", "context");
            }

            this.Context = context;
            this.DbSet   = this.Context.Set <T>();
        }
コード例 #2
0
 public ApplicationData(PhotoGalleryDbContext context)
 {
     this.context = context;
 }