流畅的NHibernate索引创建

时间:2012-04-03 12:04:32

标签: c# nhibernate orm

你能帮我把这个SQL代码写成流利的nhibernate

吗?
CREATE NONCLUSTERED INDEX [_dta_index_OKS_Plan_7_1205579333__K6_1_2_3] ON [dbo].[OKS_Plan] 
(
   [Position_id] ASC
)
INCLUDE ( [UID],
[Description],
[FileName]) WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY]

1 个答案:

答案 0 :(得分:1)

用于自动映射:

.Override<Entity>(mapping => mapping.Map(entity => entity.Property).Index("IDX_Property"))