Argonak
Argonak
CC#
Created by Argonak on 5/11/2023 in #help
✅ Linq 'nullable objects must have value' error source
Can probably mark this as solved. In my console app in memory and exact replica of data my query works fine for both ToListAsync() and .CountAsync(). There will be another thing causing my problem.
18 replies
CC#
Created by Argonak on 5/11/2023 in #help
✅ Linq 'nullable objects must have value' error source
Began on it earlier but had to leave pc, will continue on it tomorrow
18 replies
CC#
Created by Argonak on 5/11/2023 in #help
✅ Linq 'nullable objects must have value' error source
I have tried this and the result remains the same where I can only generate a list and no count
18 replies
CC#
Created by Argonak on 5/11/2023 in #help
✅ Linq 'nullable objects must have value' error source
18 replies
CC#
Created by Argonak on 5/11/2023 in #help
✅ Linq 'nullable objects must have value' error source
I can leave this filter out, each record in fact contains a string. The provider can translate it because .ToListAsync works perfectly fine with that piece in it.
18 replies
CC#
Created by Argonak on 5/11/2023 in #help
✅ Linq 'nullable objects must have value' error source
If i rewrite it as method syntax it results in the same problem.
var tenantFeatureQuery = context.TenantFeatureSettings
.Where(f => f.TenantId.HasValue && f.Name != string.Empty)
.GroupBy(f => f.TenantId)
.Select(g => new { TenantId = g.Key.Value, FeatureList = g.ToList() });
var tenantFeatureQuery = context.TenantFeatureSettings
.Where(f => f.TenantId.HasValue && f.Name != string.Empty)
.GroupBy(f => f.TenantId)
.Select(g => new { TenantId = g.Key.Value, FeatureList = g.ToList() });
18 replies