Created
October 2, 2014 05:43
-
-
Save hoangitk/2e9fb9056bbf0c82ec0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class EntitytMap:ClassMap<Entity> | |
| { | |
| public EntitytMap() | |
| { | |
| Table("TableName"); | |
| Schema(Session.TenantName); | |
| Id(p => p.Id, "Id").GeneratedBy.Identity(); | |
| } | |
| } | |
| //If you want to have each tenant in their own schema, this should work. If you want to keep the schema the same but have a prefix on the table, you could change to: | |
| public class EntityMap:ClassMap<Entity> | |
| { | |
| public EntityMap() | |
| { | |
| Table(Session.TenantPrefix + "TableName"); | |
| Schema("SCHEMA"); | |
| Id(p => p.Id, "Id").GeneratedBy.Identity(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment