运行EFProfiler发现在幕后运行的查询是
SELECT [Extent1].[Total] AS [Total]
FROM [dbo].[Invoice] AS [Extent1]
问题是数据库名称不正确。它应该是:
SELECT [Extent1].[Total] AS [Total]
FROM [Chinook].[dbo].[Invoice] AS [Extent1]
如何更改entityset架构的语法?
<EntitySet Name="Invoice" EntityType="ChinookModel.Store.Invoice" store:Type="Tables" Schema="dbo" />
我尝试将架构更改为Chinook.dbo
,但它不起作用。