I have a linked table I access like this:
SELECT Id, Name FROM MySchema.Sectors@STATS
How do I define that in Linq2db?
I tried:
[Table(Schema = "MySchema", Name = "SECTORS@STATS")]
public partial class Sector
but when I try to load it, I get
ORA-00942: table or view does not exist
CodePudding user response:
You have to set Server
property:
[Table(Schema = "MySchema", Name = "SECTORS", Server = "STATS")]
public partial class Sector
{
...
}
Also you can do that dynamically when building query:
var result = db.GetTable<Sector>().ServerName("STATS")
.ToList();