예제 #1
0
 public ShipService(ILogger <ShipService> logger, IShipRepository shipRepository)
 {
     _logger         = logger;
     _shipRepository = shipRepository;
     _shipRepository.AddShip(new Ship {
         ShipId    = 1,
         ShipName  = "Test Ship",
         ShipSpeed = 1.0
     });
 }
예제 #2
0
        public async Task <bool> AddShip(Ship ship)
        {
            await _shipRepository.AddShip(ship);

            return(true);
        }