gpt4 book ai didi

petapoco - 如何使用 PetaPoco 显式包含映射表

转载 作者:行者123 更新时间:2023-12-02 08:04:42 29 4
gpt4 key购买 nike

我想在大约有 600 个表的表上使用 PetaPoco,但我只想映射少数表。

有没有办法明确声明我想要映射的表? t4 模板中的配置 (tables["tablename"].Ignore = true) 并不能真正适应这种方法?

最佳答案

我最终这样做了:

Tables tables = LoadTables();

foreach(Table t in tables)
{
if(!t.Name.Contains("all_user_group"))
{
t.Ignore = true;
}
}

关于petapoco - 如何使用 PetaPoco 显式包含映射表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7386123/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com