Where.net MVC5 database query results can be filtered called again, sort?
ViewBag, codebehind (categories.aspx.cs) save again get to null,
The Session save, again is not null, but prompt DbContext is released,
The query, save:
IQueryable
Query=query. The where (... );
The Session (" query ")=query;
Through Ajax calls in another way:
IQueryable
Query=query. The where (... & & . );
JsonSerializerSettings Settings=new JsonSerializerSettings
{
ReferenceLoopHandling=ReferenceLoopHandling. Ignore
};
Return the Content (JsonConvert SerializeObject (query. ToList (), Settings));
Error:
System. InvalidOperationException: "The operation always be completed because The DbContext has had been disposed."
Excuse me, how to solve the
CodePudding user response:
But prompt DbContext has releasedYou use the using?
To try new
CodePudding user response:
Hello! Excuse me where changes? Link is a Java, look not to understand, please give directions,