public HomeController()
 {
     _db         = new foryoubestDb();
     _userRep    = new UserRepository(_db);
     _orgRep     = new OrganizationRepository(_db);
     _OrgUserRep = new OrganizationUserRepository(_db);
 }
        public PartialViewResult OrgUserPartial(int id)
        {
            foryoubestDb db   = new foryoubestDb();
            var          list = (from f in db.OrganizationUsers.Include("Organizations").Include("Users")
                                 where f.Organizations.Id == id
                                 select f).ToList();

            ViewData["org_Id"]  = id;
            ViewData["Userlar"] = _userRep.Listele();



            return(PartialView(list));
        }
 public GenericRepository(foryoubestDb _db)
 {
     db = _db;
 }
 public UserRepository(foryoubestDb db) : base(db)
 {
 }
 public OrganizationRepository(foryoubestDb db) : base(db)
 {
 }