相关疑难解决方法(0)

如何向ThenInclude添加where子句

我有3个实体:

Questionnaire.cs:

public class Questionnaire
{
    public int Id { get; set; }
    public string Name { get; set; }
    public ICollection<Question> Questions { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

Question.cs:

public class Question
{
    public int Id { get; set; }
    public string Text { get; set; }
    public ICollection<Answer> Answers { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

并且Answer.cs:

public class Answer
{
    public int Id { get; set; }
    public string UserId { get; set; }
    public string …
Run Code Online (Sandbox Code Playgroud)

c# linq entity-framework entity-framework-core asp.net-core

9
推荐指数
1
解决办法
5572
查看次数