Esempio n. 1
0
 public Fish Build(int id, Species species, Locale locale, bool hasPhoto)
 {
     return new Fish(id)
             {
                    Genus = species.Genus,
                    Species = species,
                    Locale = locale,
                    HasPhotos = hasPhoto
             };
 }
Esempio n. 2
0
 public LocaleDto Build(Locale locale)
 {
     return new LocaleDto
                {
                    Id = locale.Id,
                    Name = locale.Name,
                    Latitude = locale.Latitude,
                    Longitude = locale.Longitude,
                    HasPhotos = locale.HasPhotos
                };
 }
        public PhotoGalleryViewModel Build(Locale locale)
        {
            var viewModel = new PhotoGalleryViewModel { Name = locale.Name, Photos = this.photosRepository.GetForLocale(locale.Id).ToDtoList() };

            return viewModel;
        }
Esempio n. 4
0
 public static LocaleDto Build(Locale locale)
 {
     return new LocaleDto { Id = locale.Id, Name = locale.Name, Latitude = locale.Latitude, Longitude = locale.Longitude, HasPhotos = locale.HasPhotos, ZoomLevel = locale.ZoomLevel, Description = locale.Description, HasDescription = locale.HasDescription, Lake = Build(locale.Lake) };
 }
Esempio n. 5
0
        public HeaderViewModel Build(Locale locale)
        {
            var viewModel = new HeaderViewModel { Lakes = this.lakeRepository.GetAll().ToDtoList(), SelectedLakeId = locale.Lake.Id, GenusTypes = this.genusTypeRepository.GetFromLake(locale.Lake.Id).ToDtoList() };

            return viewModel;
        }