public List<MongoShipType> GenerateShipTypeData(MongoDatabase db, IRandomGenerator random, int count) { string type; DateTime modelAge; decimal price; DateTime after = new DateTime(1970, 1, 1, 23, 59, 59); DateTime before = new DateTime(2015, 12, 30, 23, 59, 59); List<MongoShipType> mongoShipTypes = new List<MongoShipType>(); for (int i = 0; i < count; i++) { type = random.GetRandomString(random.GetRandomNumber(5, 50)); modelAge = random.GetRandomDate(after, before); price = (decimal)(random.GetRandomNumber(10000, 1000000) / 100); var shipType = new MongoShipType(type, modelAge, price); mongoShipTypes.Add(shipType); } return mongoShipTypes; }
// TODO: Add ShipType type public MongoShip(int customId, string name, MongoShipType type) { this.CustomId = customId; this.Name = name; this.Type = type; }