我有一个链接表,我这样访问:
SELECT Id, Name FROM MySchema.Sectors@STATS
如何在Linq2db中定义?
我试着:
[Table(Schema = "MySchema", Name = "SECTORS@STATS")]
public partial class Sector
但是当我试图加载它时,我得到
ORA-00942:表或视图不存在
您必须设置Server
属性:
[Table(Schema = "MySchema", Name = "SECTORS", Server = "STATS")]
public partial class Sector
{
...
}
也可以在构建query时动态地执行:
var result = db.GetTable<Sector>().ServerName("STATS")
.ToList();