Does it make sense to call .AsNoTracking for OData GET controller actions?
Open
@corranrogue9 is already working on this.
Since Jun 27, 2023.
documentation
question
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
There is .AsNoTracking() method in EF Core which ensures minimal memory usage and optimal performance for read operation. When I found examples of OData controllers online, I've never seen using .AsNoTracking() for Get and Get(id) methods. For example, in MS docs both
- OData for .NET Core https://learn.microsoft.com/en-us/odata/webapi-8/tutorials/basic-crud
- OData for .NET Framework https://learn.microsoft.com/en-us/aspnet/web-api/overview/odata-support-in-aspnet-web-api/odata-v4/create-an-odata-v4-endpoint
don't use it.
So, does it make sense to use it for OData read queries?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.