This is my Class:
(这是我的课:)
public class Recipe
{
/// <summary>
/// PK
/// </summary>
public Guid Id { get; set; }
[Required]
// here should be the Id, for the initial (, in its related) recipes
public Guid BaseId { get; set; }
/// <summary>
/// All related recipes
/// </summary>
public virtual ICollection<Recipe> RelatedRecipes { get; set; }
//...
}
Actually I want to get all RelatedRecipes
with a single statement, without extra Where(x=>...
-filtering.
(实际上,我想用一个语句获取所有RelatedRecipes
,而没有多余的Where(x=>...
-filtering)。)
This is my Context:
(这是我的上下文:)
return await context.Recipes.Include(b => b.RelatedRecipes)...
What should I do ?
(我该怎么办 ?)
ask by StartingAgain translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…