You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having trouble to insert an object using a POST request. DictAreas entity are associated with a one-to-many DictCities entity. When I submit a request, it sends me a response with this exception and a 500 status code, but when I check the DB, I see that the value for DictAreas has been added. Is it possible to somehow disable the hierarchical data insertion mode or solve this problem differently?
I am using models created by Linq2Db with T4 templates (MS SQL Server). We are also trying to make one controller for all entities, GET and PATCH requests works fine, but there are problems with this exception.
Exception
System.InvalidOperationException: Not found table for clr type ExampleProject.DB.DictCity
at OdataToEntity.Linq2Db.OeLinq2DbDataContext.UpdateIdentities(OeLinq2DbTable table, Int32 lastIndex)
at OdataToEntity.Linq2Db.OeLinq2DbDataContext.SaveChanges(DataConnection dataConnection)
at OdataToEntity.Linq2Db.OeLinq2DbDataAdapter`1.SaveChangesAsync(Object dataContext, CancellationToken cancellationToken)
at OdataToEntity.AspNetCore.OeBatchFilterAttributeAttribute.OnActionExecuted(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
Description
I am having trouble to insert an object using a POST request. DictAreas entity are associated with a one-to-many DictCities entity. When I submit a request, it sends me a response with this exception and a 500 status code, but when I check the DB, I see that the value for DictAreas has been added. Is it possible to somehow disable the hierarchical data insertion mode or solve this problem differently?
I am using models created by Linq2Db with T4 templates (MS SQL Server). We are also trying to make one controller for all entities, GET and PATCH requests works fine, but there are problems with this exception.
Exception
Code
Models
Controller
The text was updated successfully, but these errors were encountered: