Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

Post Timeline

deleted 99 characters in body
Source Link
Olivier Jacot-Descombes
  • 114.3k
  • 14
  • 149
  • 202
var activeDetails1 = await ctx.LogicPointWorkFlowDetails
 .Where(x => x.Status == Lms.UnifiedContextDb.Models.Enums.WorkFlowStatus.Active)
 .Where(x => x.WorkFlow != null
 && x.WorkFlow.Blocks != null
 && x.WorkFlow.Blocks.Any(g => g.LogicPointWorkFlowBlockId != null
 && blockIds.Contains(g.LogicPointWorkFlowBlockId)))
 .Select(x => x.WorkFlow)
 .ToListAsync();
var activeDetails1 = await ctx.LogicPointWorkFlowDetails
 .Where(x => x.Status == Lms.UnifiedContextDb.Models.Enums.WorkFlowStatus.Active)
 .Where(x => x.WorkFlow != null
 && x.WorkFlow.Blocks != null
 && x.WorkFlow.Blocks.Any(g => g.LogicPointWorkFlowBlockId != null
 && blockIds.Contains(g.LogicPointWorkFlowBlockId)))
 .Select(x => x.WorkFlow)
 .ToListAsync();
var activeDetails1 = await ctx.LogicPointWorkFlowDetails
 .Where(x => x.Status == Lms.UnifiedContextDb.Models.Enums.WorkFlowStatus.Active)
 .Where(x => x.WorkFlow != null
 && x.WorkFlow.Blocks != null
 && x.WorkFlow.Blocks.Any(g => g.LogicPointWorkFlowBlockId != null
 && blockIds.Contains(g.LogicPointWorkFlowBlockId)))
 .Select(x => x.WorkFlow)
 .ToListAsync();
Add sql-server-2019 tag
Source Link
Gert Arnold
  • 110k
  • 36
  • 219
  • 319

EF Core 8 JSON column mapping – navigation property throws NullReferenceException

I'm using C# with .NET 8 and Entity Framework Core 8.0.1 with a SQL Server 2019 database.

I have a model with a WorkFlow column in the database, defined as nvarchar(MAX) and storing JSON data. Previously, we treated it as a plain string in our C# entity, but I'm now trying to take advantage of EF Core 8’s JSON column mapping feature to deserialize it directly into a strongly typed object.

EF Core 8 JSON column mapping – navigation property throws NullReferenceException

I'm using C# with .NET 8 and Entity Framework Core 8.0.1 with a SQL Server 2019 database.

I have a model with a WorkFlow column in the database, defined as nvarchar(MAX) and storing JSON data. Previously, we treated it as a plain string in our C# entity, but I'm now trying to take advantage of EF Core 8’s JSON column mapping feature to deserialize it directly into a strongly typed object.

JSON column mapping – navigation property throws NullReferenceException

I have a model with a WorkFlow column in the database, defined as nvarchar(MAX) and storing JSON data. Previously, we treated it as a plain string in our C# entity, but I'm now trying to take advantage of EF Core 8’s JSON column mapping feature to deserialize it directly into a strongly typed object.

Source Link
Loading
created from staging ground
lang-cs

AltStyle によって変換されたページ (->オリジナル) /