Firebird和Entity Framework区分大小写的表/列名称 [英] Firebird and Entity Framework case sensitve table/column names

查看:135
本文介绍了Firebird和Entity Framework区分大小写的表/列名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Firebird时,我可以查询表及其列,而不必担心大小写。如果我想区分大小写,可以将表/列名称放在引号中。

When working with Firebird I can query a table and its columns without worrying about case. If I want case sensitivity I can put the table/column name in quotes.

Firebird Entity Framework连接器在生成查询时会自动在名称周围加上引号,因此

The Firebird Entity Framework connector automatically puts quotes around names when generating queries, and as a result it forces case sensitivity on me.

这意味着我到处都有一堆[Table( SOMETABLE)]和[Column( DESCRIPTION)],因为我现有的表名全部大写。

This means I have a bunch of [Table("SOMETABLE")] and [Column("DESCRIPTION")] all over the place because my existing table names are in all-caps.

如何告诉Firebird的EF连接器不区分大小写?

How can I tell the EF connector for Firebird to not be case sensitive?

推荐答案

您不能。名称将始终被引用。您必须提供真实的名称,使用不同的大小写时,ORM不会依赖引擎中的后备逻辑。

You can't. The names will be always quoted. You have to provide real names, the ORM doesn't rely on fallback logic in engine when using different casing.

OTOH您可以使用带引号的标识符和然后将保留大小写。

OTOH you can create tables and columns using quoted identifiers and the casing will be then preserved.

这篇关于Firebird和Entity Framework区分大小写的表/列名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆