1

Graph Table in SQL Server automatically added an internal graph_ID_ column for user. When querying the table in LINQPad, got this error.

enter image description here

Here is the SQL being generated in LINQPad. Looks like LINQ_TO_SQL detected this column, and treated this column as normal column, but SQL Server does not allow us to access it.

enter image description here

I can write LINQ query without this column, it works OK. but since it's a custom query, I lost the ability to edit the record.

enter image description here

Jerry Nixon
  • 31,313
  • 14
  • 117
  • 233
Rm558
  • 4,621
  • 3
  • 38
  • 43
  • You share an observation here, it's not a question. What in fact you're saying is, LINQ-to-SQL doesn't support SQL Server's graph table. That shouldn't surprise anyone. – Gert Arnold Jun 16 '19 at 10:00
  • Thanks @Gert Arnold, I changed the title to make it a question. LINQPad in the past has a configuration to allow SQL Server XML data type to be generated as string type in C#, I am hoping something like this exists. – Rm558 Jun 16 '19 at 13:40
  • The syntax of querying a graph table is different than that of a standard tabel and never requires the `graph_id` column to be queried directly. LINQ-to-SQL doesn't know this and just generates standard SQL syntax. – Gert Arnold Jun 17 '19 at 13:14
  • 1
    What you're asking is whether LINQPad can ignore graph_id columns when querying, right? I'll try and look into this over the next week, and if it can be done, whether it can go into the next LINQPad update. – Joe Albahari Jun 17 '19 at 15:30
  • Yes @Joe Albahari, please have LINQPad ignore this column automatically when writing LINQ query, also allowing edit graph record data in paid LINQPad version. – Rm558 Jun 17 '19 at 16:11

0 Answers0