Esempio n. 1
0
        async Task IStartDataService.AddHotels()
        {
            PlacementType placement = await _placementTypeRepository.Get(1);

            City city = await _cityRepository.Get(1);

            await _hotelRepository.Add(new Hotel
            {
                Name          = "КоралРиф",
                Stars         = 5,
                PlacementType = placement,
                City          = city
            });
        }
Esempio n. 2
0
        async Task <IEnumerable <PlacementTypeDTO> > IService <PlacementTypeDTO, int> .Get()
        {
            IEnumerable <PlacementType> placements = await _placementTypeRepository.Get();

            return(_mapper.Map <IEnumerable <PlacementType>, IEnumerable <PlacementTypeDTO> >(placements));
        }