Ejemplo n.º 1
0
        public HeaderViewModel Build(Fish fish)
        {
            var viewModel = new HeaderViewModel
                {
                    Lakes = this.lakeRepository.GetAll().ToDtoList(),
                    SelectedGenusTypeId = fish.Genus.GenusType.Id,
                    SelectedLakeId = fish.Locale.Lake.Id,
                    GenusTypes = this.genusTypeRepository.GetFromLake(fish.Locale.Lake.Id).ToDtoList()
                };

            return viewModel;
        }
Ejemplo n.º 2
0
        public HeaderViewModel Build(GenusType genusType)
        {
            var viewModel = new HeaderViewModel { SelectedGenusTypeId = genusType.Id, SelectedLakeId = genusType.Lake.Id, GenusTypes = this.genusTypeRepository.GetFromLake(genusType.Lake.Id).ToDtoList(), Lakes = this.lakeRepository.GetAll().ToDtoList() };

            return viewModel;
        }
Ejemplo n.º 3
0
        public HeaderViewModel Build()
        {
            var viewModel = new HeaderViewModel { Lakes = this.lakeRepository.GetAll().ToDtoList(), GenusTypes = new List<GenusTypeDto>() };

            return viewModel;
        }