コード例 #1
0
        public static Manufacturer ParseManufacturer(MongoManufacturer manufacturer)
        {
            var result = new Manufacturer();

            result.ManufacturerName = manufacturer.ManufacturerName;

            return result;
        }
コード例 #2
0
        public static void FillSampleManufacturers()
        {
            var manufacturers = new string[] { "Samsung Electronics Co.", "Nokia", "Apple Inc.", "LG Electronics", 
                                                "ZTE", "Huawei", "TCL Communication", "Lenovo",
                                                "Sony Mobile Communications", "Panasonic Corp." };

            for (int i = 0; i < manufacturers.Length; i++)
            {
                var manufacturer = new MongoManufacturer
                {
                    ManufacturerId = i,
                    ManufacturerName = manufacturers[i],
                };

                MongoDbProvider.SaveData<MongoManufacturer>(MongoDbProvider.db, manufacturer);
            }
        }