Created
March 30, 2026 06:13
-
-
Save abhishekluv/2c0a1c1e54d2672e785d8f5cbc5e48b3 to your computer and use it in GitHub Desktop.
DemoCode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var instances = await context.Instances | |
| .Where(i => | |
| i.SubjectUuid == subjectUuid && | |
| i.VersionUuid == versionUuid) | |
| .Select(i => new | |
| { | |
| Instance = i, | |
| HasSubmissions = i.Submissions.Any() // using Any() to check if any submissions are there or not | |
| }) | |
| .AsSplitQuery() | |
| .ToListAsync(); | |
| foreach (var item in instances) | |
| { | |
| UpdateInstancesWithEndDate( | |
| item.Instance, | |
| item.HasSubmissions | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment