Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个相当大的数据库,用 t4 编写脚本会生成大约 30k 行代码。由于此应用程序仅使用 2 个存储过程,有没有办法告诉 t4 生成器只处理我需要映射的特定存储过程名称?
我知道我可以手动删除剩余部分,但创建它们会更容易
在元数据加载(Load*Metadata调用)之后,您应该添加代码以检查所有程序并删除除您需要的程序之外的所有程序
Load*Metadata
foreach (var p in Procedures.ToList()) if (p.Value.ProcedureName != "put_your_name_here") Procedures.Remove(p.Key);