1

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

1 Answer 1

3

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();
Sign up to request clarification or add additional context in comments.

1 Comment

Perfect, thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.