public static List <Fleet> InsertUpdatePlayerShip(BuildingQue ship) { List <Fleet> fleets = ShipDAL.GetUserFleets(ship.UserID, ship.PlanetID).FindAll(x => x.Status == 0).OrderBy(x => x.Arrival).ToList(); if (fleets.Count == 0) { ShipDAL.AddFleet(ship); } else { ShipDAL.AddFleetDetails(ship, fleets[0].FleetID); } fleets = ShipDAL.GetUserFleets(ship.UserID, ship.PlanetID); return(fleets); }