var result = from nae in nettingAgreement
join no in nettingOpinion on nae.EntityId equals no.EntityId into pp
from test in pp.DefaultIfEmpty(new NettingOpinion())
join np in nettingProduct on test.ProductId equals np.Id into npd
from npdSubset in npd.DefaultIfEmpty()
group npdSubset by new { nae.EntityId, nae.EntityName, nae.DocType, nae.Jurisdiction } into g
select new NettingAgreementEntityDto
{
Id = g.Key.EntityId,
EntityName = g.Key.EntityName,
DocType = g.Key.DocType,
Jurisdiction = g.Key.Jurisdiction,
ProductList = g.Select(x => new NettingAgreementProductDto
{
Id = x?.Id ?? 0,
Name = x == null ? string.Empty : x.Name
}).ToList()
};
此代码还可以将文件上传到Google驱动器,但是在执行过程中,它需要进入gmail登录页面。选择正确的邮件并授予允许删除/创建等权限后,它将文件添加到驱动器。 我希望上传文件时无需手动执行任何操作。请帮忙。