public IEnumerable <ConstituencyViewModel> GetAll(string name, int?constituencyTypeId, int?areaId, int?partyId, bool?current)
        {
            var constituencies = _constituencyRepository.GetAll(name, constituencyTypeId, areaId, partyId, current).Result;

            return(constituencies.Select(ModelTransformer.ConstituencyToConstituencyViewModel));
        }
Ejemplo n.º 2
0
 public List <ConstituencyViewModel> GetAll(bool inactive = false)
 {
     return(_constituencyRepository.GetAll(inactive).ToList()
            .Select(c => new ConstituencyViewModel(c)) as List <ConstituencyViewModel>);
 }