Exemplo n.º 1
0
        public static List<Model> ListModels( int manufacturerId, bool isCarModel, bool showAll, IEnumerable<int> countriesIds )
        {
            using( var ctx = new TecdocBaseDataContext() )
            {
                ctx.DeferredLoadingEnabled = false;
                DataLoadOptions dlo = new DataLoadOptions();
                dlo.LoadWith<Model>( m => m.Name );
                ctx.LoadOptions = dlo;

                return ctx.ListModels( manufacturerId, isCarModel, showAll, countriesIds );
            }
        }
Exemplo n.º 2
0
        public void ListModelsTest()
        {
            using( var ctx = new TecdocBaseDataContext() )
            {
                var mfr = GetManufacturer( null );
                var arr1 = ctx.ListModels(mfr.ID, true, true, new int[] { 185, 246 });
                var arr2 = ctx.ListModels(mfr.ID, true, false, new int[] { 185, 246 });
                Assert.IsTrue( arr1.Count >= arr2.Count );

                var curModels = ctx.ListModels( mfr.ID );

            }
        }
Exemplo n.º 3
0
        public static List<Model> ListModels( int manufacturerID )
        {
            using( var ctx = new RmsAuto.TechDoc.Entities.TecdocBase.TecdocBaseDataContext() )
            {
                var dlo = new DataLoadOptions();
                dlo.LoadWith<Model>( m => m.Name );
                ctx.LoadOptions = dlo;

                return ctx.ListModels( manufacturerID );
            }
        }