I'm using the Fluent API (with MS SQL) and am attempting to map an entity to a view. The view is already created so when I run the CreateUpdateDDLScript via the schema handler, it attempts to create a table with the name of view. Is there a way to prevent this from happening?
My mapping configuration looks like this:
var mapping =
ActID = x.Id,
ActTypeID = x.AccountType,
SrvTypeID = x.ServiceType,
ActExpDate = x.ExpirationDate,
ActExpTypeID = x.ExpirationTypeId,
ActApprovalState = x.ApprovalState,
ActStatus = x.Status,
ActLastMod = x.LastModified,
mapping.HasProperty(x => x.Id).IsIdentity(KeyGenerator.Default);
I thought about adding a custom bit of code to remove the create table SQL from the generated ddl script but that hack wouldn't be a good long term solution.