Example #1
0
 public static Model GetModelById( int modelId, bool showAll, IEnumerable<int> countriesIds )
 {
     using( var ctx = new RmsAuto.TechDoc.Entities.TecdocBase.TecdocBaseDataContext() )
     {
         DataLoadOptions dlo = new DataLoadOptions();
         dlo.LoadWith<Model>( m => m.Manufacturer );
         dlo.LoadWith<Model>( m => m.Name );
         ctx.LoadOptions = dlo;
         return ctx.GetModel( modelId, showAll, countriesIds );
     }
 }