-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

Eric Carlson
  • 761
  • 1
  • 6
  • 11

1 Answers1

0

Digging around the code a little I found the SchemaName variable. So I can create a ModelGeneratorConfig file for each schema with it's own namespace.

Mohsen Esmailpour
  • 11,224
  • 3
  • 45
  • 66
Eric Carlson
  • 761
  • 1
  • 6
  • 11