Esempio n. 1
0
        public JsonResult GetList()
        {
            IReadOnlyList <Athlete> athletes = athleteRepository.GetList();
            var dto = athletes.Select(s => new AthleteInListDto()
            {
                Id     = s.Id,
                Name   = s.Name.Value,
                Email  = s.Email.Value,
                Status = s.Status.Type.ToString(),
                StatusExpirationDate = s.Status.ExpirationDate,
                MoneySpent           = s.MoneySpent,
            }).ToList();

            return(Json(dto));
        }
Esempio n. 2
0
        public JsonResult GetList()
        {
            IReadOnlyList <Athlete> athletes = athleteRepository.GetList();

            return(Json(athletes));
        }