コード例 #1
0
ファイル: TecDocTests.cs プロジェクト: dmziryanov/ApecAuto
 public void ListModificationsTest()
 {
     using( var ctx = new TecdocBaseDataContext() )
     {
         var mfr = GetManufacturer( null, true );
         var models = mfr.Models.ToList();
         if( mfr.Models.Count > 0 )
         {
             var arr1 = ctx.ListModifications(models[0].ID, true, new int[] { 185, 246 });
             var arr2 = ctx.ListModifications(models[0].ID, false, new int[] { 185, 246 });
             Assert.IsTrue( arr2.Count <= arr1.Count );
         }
     }
 }
コード例 #2
0
ファイル: Facade.cs プロジェクト: dmziryanov/ApecAuto
        public static List<CarType> ListModifications( int modelId, bool showAll, IEnumerable<int> countriesIds )
        {
            using( var ctx = new TecdocBaseDataContext() )
            {
                DataLoadOptions dlo = new DataLoadOptions();
                dlo.LoadWith<CarType>( m => m.Name );
                dlo.LoadWith<CarType>( m => m.EngineName );
                dlo.LoadWith<CarType>( m => m.FuelSupplyName );
                ctx.LoadOptions = dlo;

                return ctx.ListModifications( modelId, showAll, countriesIds );
            }
        }