-1

Our Sql Server database has multiple schemas/owners. Some of the table names are identical without the schema so when configuring the Model Generator I would like to be able to either filter by schema or append the schema name to the table so there is no conflict. I have tried filtering by table prefix but that only seems to work on the table name.

Schema1.Companies
Schema2.Companies

I would like the Model Generator to produce either this

namespace models
    [Table("Schema1Companies")]
    [Table("Schema2Companies")]

or this

namespace models.Schema1
    [Table("Companies")]

namespace models.Schema2
    [Table("Companies")]

https://github.com/MoonStorm/Dapper.FastCRUD/wiki/Entity-registration

4

1 回答 1

0

稍微挖掘一下代码,我发现了这个SchemaName变量。所以我可以ModelGeneratorConfig为每个模式创建一个文件,并使用它自己的命名空间。

于 2017-05-10T20:18:24.240 回答