Exemplo n.º 1
0
 public ActionResult GetAdresses()
 {
     return(PartialView(Repository.GetAll()
                        .Select(x =>
                                new AdressViewModel(x)
                                ).ToList().OrderByDescending(x => x.StreetName)));
 }
Exemplo n.º 2
0
 public IEnumerable <AddressViewModel> GetAll()
 {
     return(_addressRepository.GetAll().ProjectTo <AddressViewModel>());
 }