Ok I suppose this is the SQL related to the prefetch.
Generated Sql query:
Query: SELECT [Weapon].[dbo].[Brand].[BrandId], [Weapon].[dbo].[Brand].[Description] FROM [Weapon].[dbo].[Brand] WHERE ( [Weapon].[dbo].[Brand].[BrandId] IN (@BrandId1, @BrandId2, @BrandId3, @BrandId4, @BrandId5, @BrandId6, @BrandId7, @BrandId8, @BrandId9, @BrandId10))
Parameter: @BrandId1 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 0.
Parameter: @BrandId2 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 0.
Parameter: @BrandId3 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 27.
Parameter: @BrandId4 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 0.
Parameter: @BrandId5 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 0.
Parameter: @BrandId6 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 0.
Parameter: @BrandId7 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 6.
Parameter: @BrandId8 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 6.
Parameter: @BrandId9 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 0.
Parameter: @BrandId10 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 0.
>>>The ModelEntity Prefetch (where I added the sort Clause but it didn't work :( )
Generated Sql query:
Query: SELECT [Weapon].[dbo].[Model].[ModelId], [Weapon].[dbo].[Model].[Description] FROM [Weapon].[dbo].[Model] WHERE ( [Weapon].[dbo].[Model].[ModelId] IN (@ModelId1, @ModelId2, @ModelId3, @ModelId4, @ModelId5, @ModelId6)) ORDER BY [Weapon].[dbo].[Model].[Description] ASC
Parameter: @ModelId1 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 0.
Parameter: @ModelId2 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 8.
Parameter: @ModelId3 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 37.
Parameter: @ModelId4 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 1.
Parameter: @ModelId5 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 37.
Parameter: @ModelId6 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 49.
Generated Sql query:
Query: SELECT [Weapon].[dbo].[WeaponType].[TypeId], [Weapon].[dbo].[WeaponType].[Description] FROM [Weapon].[dbo].[WeaponType] WHERE ( [Weapon].[dbo].[WeaponType].[TypeId] IN (@TypeId1, @TypeId2, @TypeId3, @TypeId4, @TypeId5, @TypeId6))
Parameter: @TypeId1 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 17.
Parameter: @TypeId2 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 3.
Parameter: @TypeId3 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 2.
Parameter: @TypeId4 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 7.
Parameter: @TypeId5 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 1.
Parameter: @TypeId6 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 9.
Query: SELECT [Weapon].[dbo].[Caliber].[CaliberId], [Weapon].[dbo].[Caliber].[Description] FROM [Weapon].[dbo].[Caliber] WHERE ( [Weapon].[dbo].[Caliber].[CaliberId] IN (@CaliberId1, @CaliberId2, @CaliberId3, @CaliberId4, @CaliberId5, @CaliberId6))
Parameter: @CaliberId1 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 26.
Parameter: @CaliberId2 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 14.
Parameter: @CaliberId3 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 29.
Parameter: @CaliberId4 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 19.
Parameter: @CaliberId5 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 31.
Parameter: @CaliberId6 : Int32. Length: 0. Precision: 10. Scale: 0. Direction: Input. Value: 20.