Exemplo n.º 1
0
        public void addShip(shipModel ship)
        {
            Data.Entities.spaceship realShip = toShip(ship);
            Database data = new Database();

            data.ships.Add(realShip);
            data.SaveChanges();
        }
Exemplo n.º 2
0
 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
     });
 }