I have designed 2 tables to store data.
If I want to just show a list of tables with 2 columns and the column value, how should I write my LINQ query in C#?
I can't even pivot it using SQL. This my query
SELECT FieldValue, recordid
FROM [TableMetadatas] t inner join TableMetadataTemplates t2
on t.[TableMetadataTemplateId] = t2.id
where (FieldName = 'application_name' or fieldname = 'application_category')
and TableName = 'application'
group by t.FieldValue, t.recordid
order by recordid
Problem is each row is each field value instead of each record.
Application 1
application_type value 1
Application 2
application_type value 2
The expected result should be below:
Application 1 | application_type value 1
Application 2 | application_type value 2