Example #1
0
 public void AddShip()
 {
     _planetService.Add(new SpaceShip
     {
         MaxCapacity = 60,
         Planet      = _planetService.GetPlanetList()[0],
         Utilization = 60,
     });
 }
        public async Task <PlanetViewModel> Add(PlanetViewModel planetViewModel)
        {
            var teste = await GetMovieQuantity(planetViewModel);

            var planet = Mapper.Map <PlanetViewModel, Planet>(planetViewModel);

            var planetReturn = _planetService.Add(planet);

            planetViewModel = Mapper.Map <Planet, PlanetViewModel>(planetReturn);

            return(planetViewModel);
        }