📜  ef core include count - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:45.184000             🧑  作者: Mango

代码示例1
var animeList = db.Anime.Select(a => new AnimeInfo
{
    Id = a.Id,
    Name = a.Name,
    EpisodeCount = a.Episodes.Count()
})
.ToList();