Exemplo n.º 1
0
        public static async Task WrapInAsync(this TeamDto dto, Team team, HemaneContext context)
        {
            team.Name = dto.Name;
            team.Club = await context.Clubs.SingleAsync(c => c.Id == dto.ClubId);

            team.League = await context.Leagues.SingleAsync(l => l.Id == dto.LeagueId);
        }
Exemplo n.º 2
0
 public TeamService(HemaneContext context, IUserService userService, IClubService clubService, IMatchService matchService)
 {
     _context      = context;
     _userService  = userService;
     _clubService  = clubService;
     _matchService = matchService;
 }
Exemplo n.º 3
0
 public static Match AsModel(this MatchDto dto, HemaneContext context)
 {
     return(new Match
     {
         Id = dto.Id,
         Day = FindSingleDay(context, dto.DayId)
     });
 }
Exemplo n.º 4
0
 private static Day FindSingleDay(HemaneContext context, int id)
 {
     return(context.Days.Single(l => l.Id == id));
 }
Exemplo n.º 5
0
 public static void WrapIn(this LeagueDto dto, League league, HemaneContext context)
 {
     league.Name  = dto.Name;
     league.Sport = context.Sports.Single(s => s.Id == dto.SportId);
 }
Exemplo n.º 6
0
 public UserService(HemaneContext hemaneContext, IHttpContextAccessor httpContextAccessor)
 {
     this._hemaneContext = hemaneContext;
     _httpContextAccessor = httpContextAccessor;
 }
Exemplo n.º 7
0
 public LeagueService(HemaneContext context, IUserService userService)
 {
     _context     = context;
     _userService = userService;
 }
Exemplo n.º 8
0
 public DisplayService(HemaneContext context)
 {
     _context = context;
 }
Exemplo n.º 9
0
 public MatchService(HemaneContext context)
 {
     _context = context;
 }
Exemplo n.º 10
0
 public ClubService(HemaneContext context, IUserService userService)
 {
     _context     = context;
     _userService = userService;
 }