Пример #1
0
 public async Task <ListModel <object> > ListAsync()
 {
     return(new ListModel <object>
     {
         Items = (await _parkRepository.GetAllAsync(p => new
         {
             p.Id,
             p.Name,
             p.RegionJson
         })).Select(p => new
         {
             p.Id,
             p.Name,
             Region = p.RegionJson.FromJson <Region>()
         }).ToArray()
     });
 }