J
jelle79
Hi all,
I'm storing all kind of data stored in objects. Now I want to query my
data-source. And I thought LINQ is the right thing for it.
Data is stored like:
store.Database["%Testtable%"][%RowID%]["%Fieldname%"]
Queries like this work:
var q = from row store.Database["%Testtable%"].Rows
where row.ID == 10
select new { Id = row.ID, Label = row["Label"] };
I want to query my data with a XML-syntax, like:
<data>
<query>
<table name="Testtable" alias="t" />
<table name="Testtable_2" alias="t2" innerjoin="t.ID == t2.ID" />
<where condition="t.ID == 10" />
<field table="t" name="ID" alias="Id" />
<field table="t" name="Label" alias="Label" />
<field table="t2" name="Label" alias="Label" />
</query>
</data>
Do you think this is possible? To parse this XML to a working LINQ-
query? I've tried lots of things, but I cannot get it to work! :S
Hopefully someone can help me. Or if you could suggest me an
alternative, I will think about this too.
Thanks.
Jelle
I'm storing all kind of data stored in objects. Now I want to query my
data-source. And I thought LINQ is the right thing for it.
Data is stored like:
store.Database["%Testtable%"][%RowID%]["%Fieldname%"]
Queries like this work:
var q = from row store.Database["%Testtable%"].Rows
where row.ID == 10
select new { Id = row.ID, Label = row["Label"] };
I want to query my data with a XML-syntax, like:
<data>
<query>
<table name="Testtable" alias="t" />
<table name="Testtable_2" alias="t2" innerjoin="t.ID == t2.ID" />
<where condition="t.ID == 10" />
<field table="t" name="ID" alias="Id" />
<field table="t" name="Label" alias="Label" />
<field table="t2" name="Label" alias="Label" />
</query>
</data>
Do you think this is possible? To parse this XML to a working LINQ-
query? I've tried lots of things, but I cannot get it to work! :S
Hopefully someone can help me. Or if you could suggest me an
alternative, I will think about this too.
Thanks.
Jelle