c# - 我有一些概念,这些概念有概念子。所有这些插入在一起
问题描述
我有一些概念,这些概念有概念子。
所有这些插入在一起。
现在我想更新这些。例如:Concept-1有三个 sub,分别是conceptSub-1、conceptSub-2、conceptSub-3。
我想更新这个(添加或删除他们的一个子)。
概念Dto:
public Guid ConceptManagementId { get; set; }
public string ConceptName { get; set; }
public bool IsOriginalNameShow { get; set; }
public bool IsSubNameShow { get; set; }
public List<ConceptSubDto> ConceptSubSidiary { get; set; }
概念子目录:
public Guid ConceptSubId { get; set; }
public string ConceptSubName { get; set; }
这是我的服务:
public async Task<bool> UpdateConcept(ConceptManagementDto dto)
{
var concept = await _conceptManagementRepository.Query().Include(x => x.conceptSubSidiaries)
.GetOneAsync(x => x.Id == dto.ConceptManagementId);
concept.EditConcept(dto.ConceptName,
dto.IsSubNameShow,
dto.IsOriginalName
);
?
?
_conceptManagementRepository.Update(concept);
await _conceptManagementRepository.SaveChangesAsync();
return true;
}
请你能帮我弄清楚我放置问号的地方缺少什么吗?