请考虑以下事项:
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Bll {
public static class Extensions {
public static IQueryable<Sys.EntityModels.BfxProject> CompleteProject( this Sys.EntityModels.BfxEntities context ) {
return context.BfxProjects
.Include( x => x.BfxFiles.Select( f => f.BfxSecurity ) );
}
}
}
BfxProjects可以嵌套BfxProjects。我希望CompleteProject扩展方法以递归方式返回任何嵌套的BfxProjects。我该如何做到这一点?