I have a strange problem. I have a normal SQL view which I have added to my entity model (it has 2993 rows). I call entitymanager.(myviews).ExecuteAsync(). I trace this in SQL profiler. I see the normal batch call. I then see 350 SP calls with exactly the same batch call SQL query.
I thought maybe the problem was the view didn't have a primary key, so I added one as a string combination of primary keys, and I updated the model entity so that this was the only entity key, but it had no effect.
I am stumped. Why is IdeaBlade calling the exact same SQL code 350 times after the batch call? If I call the view with a specific record, it does the same thing.
I've added the 3 of the SQL trace rows below, there are 350 more of these:
OperationsEntities.vwSupplierServiceRouteYesList.ExecuteAsync();
SQL:BatchStarting SELECT [Extent1].[SupplierId] AS [SupplierId], [Extent1].[SupplierAccountNumber] AS [SupplierAccountNumber], [Extent1].[SupplierName] AS [SupplierName], [Extent1].[SupplierServiceId] AS [SupplierServiceId], [Extent1].[SupplierService] AS [SupplierService], [Extent1].[RouteId] AS [RouteId], [Extent1].[RouteCode] AS [RouteCode], [Extent1].[Route] AS [Route], [Extent1].[IsPreferredSupplier] AS [IsPreferredSupplier], [Extent1].[AutoGenerateSupplierManifestNumber] AS [AutoGenerateSupplierManifestNumber], [Extent1].[PrimaryKey] AS [PrimaryKey] FROM (SELECT [vwSupplierServiceRouteYes].[SupplierId] AS [SupplierId], [vwSupplierServiceRouteYes].[SupplierAccountNumber] AS [SupplierAccountNumber], [vwSupplierServiceRouteYes].[SupplierName] AS [SupplierName], [vwSupplierServiceRouteYes].[SupplierServiceId] AS [SupplierServiceId], [vwSupplierServiceRouteYes].[SupplierService] AS [SupplierService], [vwSupplierServiceRouteYes].[RouteId] AS [RouteId], [vwSupplierServiceRouteYes].[RouteCode] AS [RouteCode], [vwSupplierServiceRouteYes].[Route] AS [Route], [vwSupplierServiceRouteYes].[IsPreferredSupplier] AS [IsPreferredSupplier], [vwSupplierServiceRouteYes].[AutoGenerateSupplierManifestNumber] AS [AutoGenerateSupplierManifestNumber], [vwSupplierServiceRouteYes].[PrimaryKey] AS [PrimaryKey] FROM [dbo].[vwSupplierServiceRouteYes] AS [vwSupplierServiceRouteYes]) AS [Extent1]
SP:Starting SELECT [Extent1].[SupplierId] AS [SupplierId], [Extent1].[SupplierAccountNumber] AS [SupplierAccountNumber], [Extent1].[SupplierName] AS [SupplierName], [Extent1].[SupplierServiceId] AS [SupplierServiceId], [Extent1].[SupplierService] AS [SupplierService], [Extent1].[RouteId] AS [RouteId], [Extent1].[RouteCode] AS [RouteCode], [Extent1].[Route] AS [Route], [Extent1].[IsPreferredSupplier] AS [IsPreferredSupplier], [Extent1].[AutoGenerateSupplierManifestNumber] AS [AutoGenerateSupplierManifestNumber], [Extent1].[PrimaryKey] AS [PrimaryKey] FROM (SELECT [vwSupplierServiceRouteYes].[SupplierId] AS [SupplierId], [vwSupplierServiceRouteYes].[SupplierAccountNumber] AS [SupplierAccountNumber], [vwSupplierServiceRouteYes].[SupplierName] AS [SupplierName], [vwSupplierServiceRouteYes].[SupplierServiceId] AS [SupplierServiceId], [vwSupplierServiceRouteYes].[SupplierService] AS [SupplierService], [vwSupplierServiceRouteYes].[RouteId] AS [RouteId], [vwSupplierServiceRouteYes].[RouteCode] AS [RouteCode], [vwSupplierServiceRouteYes].[Route] AS [Route], [vwSupplierServiceRouteYes].[IsPreferredSupplier] AS [IsPreferredSupplier], [vwSupplierServiceRouteYes].[AutoGenerateSupplierManifestNumber] AS [AutoGenerateSupplierManifestNumber], [vwSupplierServiceRouteYes].[PrimaryKey] AS [PrimaryKey] FROM [dbo].[vwSupplierServiceRouteYes] AS [vwSupplierServiceRouteYes]) AS [Extent1]
SP:Starting SELECT [Extent1].[SupplierId] AS [SupplierId], [Extent1].[SupplierAccountNumber] AS [SupplierAccountNumber], [Extent1].[SupplierName] AS [SupplierName], [Extent1].[SupplierServiceId] AS [SupplierServiceId], [Extent1].[SupplierService] AS [SupplierService], [Extent1].[RouteId] AS [RouteId], [Extent1].[RouteCode] AS [RouteCode], [Extent1].[Route] AS [Route], [Extent1].[IsPreferredSupplier] AS [IsPreferredSupplier], [Extent1].[AutoGenerateSupplierManifestNumber] AS [AutoGenerateSupplierManifestNumber], [Extent1].[PrimaryKey] AS [PrimaryKey] FROM (SELECT [vwSupplierServiceRouteYes].[SupplierId] AS [SupplierId], [vwSupplierServiceRouteYes].[SupplierAccountNumber] AS [SupplierAccountNumber], [vwSupplierServiceRouteYes].[SupplierName] AS [SupplierName], [vwSupplierServiceRouteYes].[SupplierServiceId] AS [SupplierServiceId], [vwSupplierServiceRouteYes].[SupplierService] AS [SupplierService], [vwSupplierServiceRouteYes].[RouteId] AS [RouteId], [vwSupplierServiceRouteYes].[RouteCode] AS [RouteCode], [vwSupplierServiceRouteYes].[Route] AS [Route], [vwSupplierServiceRouteYes].[IsPreferredSupplier] AS [IsPreferredSupplier], [vwSupplierServiceRouteYes].[AutoGenerateSupplierManifestNumber] AS [AutoGenerateSupplierManifestNumber], [vwSupplierServiceRouteYes].[PrimaryKey] AS [PrimaryKey] FROM [dbo].[vwSupplierServiceRouteYes] AS [vwSupplierServiceRouteYes]) AS [Extent1]
|