我正在尝试编写自定义查询并不断返回
SqlException 未处理“错误”-“。”附近的语法不正确
代码:
var list = dbcontext.Database.SqlQuery<string>("SELECT a.AssetID, a.AssetName, a.Seg1_Code, d.ShortName, e.OfficePercentage, e.MaintenancePercentage" +
"FROM [Core].[dbo].[Asset] a" +
"LEFT OUTER JOIN [Core].[dbo].[AssetAddress] b" +
"ON a.AssetID = b.AssetID" +
"LEFT OUTER JOIN [Core].[dbo].[Address] c" +
"ON b.AddressID = c.AddressID" +
"LEFT OUTER JOIN [Core].[dbo].[StateLookup] d" +
"ON c.StateID = d.StateID" +
"INNER JOIN [Core].[dbo].[AssetPayrollMarkupOverride] e" +
"ON a.AssetID = e.AssetID" +
"ORDER BY d.ShortName, a.AssetName").ToList();