Example #1
0
 public UnitofWork(BlogBDContext context)
 {
     _DbContext = context;
     this.CommentsRepository = new CommentsRepository(this._DbContext);
     this.PostsRepository    = new PostsRepository(this._DbContext);
     this.ProfilesRepository = new ProfilesRepository(this._DbContext);
     this.UsersRepository    = new UsersRepository(this._DbContext);
 }
 public PostsRepository(BlogBDContext context) : base(context)
 {
     _DbContext = context;
 }
Example #3
0
 public CommentsRepository(BlogBDContext context) : base(context)
 {
     _DbContext = context;
 }
Example #4
0
 public GenericRepository(BlogBDContext context)
 {
     _DbContext = context;
     _DbSet     = _DbContext.Set <T>();
 }
 public ProfilesRepository(BlogBDContext context) : base(context)
 {
     _DbContext = context;
 }