I just started learning Nhibernate and Fluent Nhibernate. I want to specify table name when I create my mapping class.
Entity name in application is "CustomerOrders" but in the oracle database, table name is "CUSTOMER_ORDERS".
I learnt from googling that I can use "WithTable" to specify database table name.
I am not sure how to use it and where as Vs2008 didn't find the method.
Thanks
public class CustomerOrdersMap : IAutoMappingOverride<CustomerOrders>
{
public void Override(AutoMapping<CustomerOrders> mapping)
{
mapping.Table("CUSTOMER_ORDERS");
}
}
WithTable
was renamed to Table
for the 1.0 release. It was mentioned in the release notes (first bullet point).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.