NHibernate - Force escaping on Table Names

a 夏天 提交于 2019-12-05 08:38:54
Stuart Childs

Specify the table name as `User`. For example:

(HBM)
<class name="User" table="`User`">

(Fluent)
public UserMap()
{
    WithTable("`User`");
    ...

(Mapping By Code)
public UserMap()
{
    Table("`User`");
    ...

Similarly, with columns you'll have to do something like:

Map(x => x.IsCurrent, "`Current`");

Oh the joys of working with legacy DBs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!