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)); }
public JsonResult GetList() { IReadOnlyList <Athlete> athletes = athleteRepository.GetList(); return(Json(athletes)); }