Example #1
0
        public static CarType GetModification( int modificationId, 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.Model );
                dlo.LoadWith<Model>( m => m.Name );
                dlo.LoadWith<Model>( m => m.Manufacturer );
                ctx.LoadOptions = dlo;

                return ctx.GetModification( modificationId, showAll, countriesIds );
            }
        }