Example #1
0
        public static TeamSessionViewModel Convert(TeamSession teamSession)
        {
            TeamSessionViewModel model = new TeamSessionViewModel()
            {
                TeamId = teamSession.TeamId,
                Team   = teamSession.Team == null ? null : TeamConverter.Convert(teamSession.Team),
                LeagueSessionScheduleId = teamSession.LeagueSessionScheduleId
            };

            return(model);
        }
Example #2
0
        public static List <TeamSessionViewModel> ConvertList(List <TeamSession> teamSessions)
        {
            return(teamSessions.Select(teamSession =>
            {
                TeamSessionViewModel model = new TeamSessionViewModel()
                {
                    TeamId = teamSession.TeamId,
                    Team = teamSession.Team == null ? null : TeamConverter.Convert(teamSession.Team),
                    LeagueSessionScheduleId = teamSession.LeagueSessionScheduleId
                };

                return model;
            }).ToList());
        }