Upon reviewing the project code, I've identified several instances where AsNoTracking is being used unnecessarily in EF Core queries within certain use cases. This can lead to suboptimal performance and unnecessary complexity in the code. The following use cases use AsNoTracking but do not need it:
InquiryBackHalfHandler
GetLinkByGroupNameQueryHandler
GetClientMetaDataByLinkIdQueryHandler
ListOfLinksQueryHandler
Additionally, in the VisitShortenLinkQueryHandler use case, AsNoTracking is required but is missing.
Suggested Fixes
- Remove unnecessary
AsNoTracking calls to improve readability.
- Add
AsNoTracking where required to ensure better performance.
If everything looks good, I would like to take the initiative to address these issues by submitting a PR.
Upon reviewing the project code, I've identified several instances where
AsNoTrackingis being used unnecessarily in EF Core queries within certain use cases. This can lead to suboptimal performance and unnecessary complexity in the code. The following use cases useAsNoTrackingbut do not need it:InquiryBackHalfHandlerGetLinkByGroupNameQueryHandlerGetClientMetaDataByLinkIdQueryHandlerListOfLinksQueryHandlerAdditionally, in the
VisitShortenLinkQueryHandleruse case,AsNoTrackingis required but is missing.Suggested Fixes
AsNoTrackingcalls to improve readability.AsNoTrackingwhere required to ensure better performance.If everything looks good, I would like to take the initiative to address these issues by submitting a PR.