public UserTeamsController(TeamCommunicationDbContext context) { _context = context; this.factory = new DbContextFactory(); this.repo = new UserTeamRepository(factory); this.query = new GetUserTeamsQuery(factory.CreateDbContext); this.facade = new UserTeamFacade(repo, query); this.teamRepo = new TeamRepository(factory); this.teamQuery = new GetTeamsQuery(factory.CreateDbContext); this.teamFacade = new TeamFacade(teamRepo, teamQuery); this.userRepo = new UserRepository(factory); this.usersQuery = new GetUsersQuery(factory.CreateDbContext); this.userFacade = new UserFacade(userRepo, usersQuery); }
public UnitOfWork(PanacheSoftwareServiceTeamContext context, IUserProvider userProvider) : base(context, userProvider) { TeamHeaders = new TeamHeaderRepository(context); TeamDetails = new TeamDetailRepository(context, TeamHeaders); UserTeams = new UserTeamRepository(context, TeamHeaders); }
public UserTeamFacade(UserTeamRepository repository, GetUserTeamsQuery query) { this.repository = repository; this.query = query; }