public void addShip(shipModel ship) { Data.Entities.spaceship realShip = toShip(ship); Database data = new Database(); data.ships.Add(realShip); data.SaveChanges(); }
public shipModel toModel(Data.Entities.spaceship ship) { return(new shipModel { id = ship.id, userId = ship.userId, size = ship.size, description = ship.description, price = ship.price }); }