Ejemplo n.º 1
0
        public GenusPanelViewModel Build(Lake lake)
        {
            var genusType = this.genusTypeRepository.GetFromLake(lake.Id).FirstOrDefault();

            if (genusType != null)
            {
                return this.Build(genusType.Id);
            }
            return new GenusPanelViewModel { GenusList = new List<GenusDto>(), LakeId = lake.Id };
        }
Ejemplo n.º 2
0
        public HeaderViewModel Build(Lake lake)
        {
            var viewModel = this.Build();

            viewModel.SelectedLakeId = lake.Id;

            viewModel.GenusTypes = lake.GenusTypes.ToDtoList();

            return viewModel;
        }
Ejemplo n.º 3
0
 public static LakeDto Build(Lake lake)
 {
     return new LakeDto { Id = lake.Id, Name = lake.Name, GenusTypes = lake.GenusTypes.ToDtoList(), Description = lake.Description };
 }