Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use entity framework read only in more places #1702

Closed
wants to merge 8 commits into from

Conversation

andchiind
Copy link
Contributor

@andchiind andchiind commented Jul 31, 2024

By using readOnly capabilities more often we are able to be more precise with our database operations, preventing future bugs. This will also speed up the code somewhat as there are fewer checks performed when not tracking objects within an entity framework context.

We currently also manually set many object to have the entity state "detached" in the code to prevent them from being updated. I believe that by refraining from tracking these objects we may sometimes be able to avoid this "hacky" behaviour, but I am cautious about doing this in this PR. We should try to make a PR though where we investigate everywhere we use this entry state statement, and instead try to not track the object.

@andchiind andchiind force-pushed the ef-tracking-issues branch from a2f2a3d to efa6fc0 Compare July 31, 2024 12:56
@andchiind andchiind self-assigned this Aug 1, 2024
@andchiind andchiind added backend Backend related functionality improvement Improvement to existing functionality labels Aug 1, 2024
@andchiind andchiind force-pushed the ef-tracking-issues branch 2 times, most recently from ca2ea78 to 2c7cbf5 Compare August 1, 2024 11:19
@andchiind andchiind force-pushed the ef-tracking-issues branch from 2c7cbf5 to 087bafa Compare August 1, 2024 11:26
@andchiind andchiind marked this pull request as ready for review August 1, 2024 11:28
@andchiind
Copy link
Contributor Author

Closed with replacement: #1703

Too many git branching issues

@andchiind andchiind closed this Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend related functionality improvement Improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant