OData WebApi over Linq2Db
See original GitHub issueI write web-service worked by OData protocol.
As data access layer using L2DB.
If odata query include expand option, the result expression throw error:
Multiple queries are not allowed. Set the 'LinqToDB.Common.Configuration.Linq.AllowMultipleQuery' flag to 'true' to allow multiple queries.
Executable query:
db.GetTable<Department>()
.Select(Param_0 => new SelectAllAndExpand()
{
ModelID = "2cd45fee-a6aa-4d0e-9024-0a7fbc48e50b",
Instance = Param_0,
Container = new NamedProperty()
{
Name = "DepartmentHierarchyToDepartmentsChildren",
Value = IIF(
IIF((Param_0 == null), null, Param_0.DepartmentHierarchyToDepartmentsChildren) == null,
null,
IIF((Param_0 == null), null, Param_0.DepartmentHierarchyToDepartmentsChildren)
.Select(Param_1 => new SelectAll
{
ModelID = "2cd45fee-a6aa-4d0e-9024-0a7fbc48e50b",
Instance = Param_1
})
)
}
});
How to fix this error without AllowMultipleQuery=true
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
using LinqToSql with OData WebApi?
I am looking for a ODataModelBuilder that works with System.Data.Linq.Mapping to make the model. The other solution is to find the correct set ......
Read more >SkipQueryOption.ApplyTo Method
The query settings to use while applying this query option. Returns. IQueryable. The new IQueryable after the skip query has been applied to....
Read more >Libraries · OData - the Best Way to REST
LINQ -enabled client API for issuing OData queries and consuming OData JSON payloads. It's the V4 version of the former WCF Data Services...
Read more >Is using OData\IQueryable in your Web API an inherently bad ...
Using IQueryable to work with OData is like using EF with Linq2Sql, it is a way of accessing data and it's nothing wrong...
Read more >RESTier
RESTier is a RESTful API development framework for building standardized, OData V4 based RESTful services on .NET platform. It can be seen as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It turns out that LoadWith allows you to load data for an association many to one? Облом
Will close for now 😦