A
Anton Bar
Hi all,
I have the following problem. I have a database table that I want to read
using LINQ and being able to access field values by name, like this:
var languages = from lg in context.SystemLanguages select lg;
foreach (SystemLanguage lang in languages)
{
// now I'd like to do smth like this:
string name = lang.Field(sFieldName);
.........
}
The problem is that the "sFieldName" string is built dynamically, so I
cannot use the predefined strongly typed properties!!!
Any bright ideas?
Thanks in advance,
Anton.
I have the following problem. I have a database table that I want to read
using LINQ and being able to access field values by name, like this:
var languages = from lg in context.SystemLanguages select lg;
foreach (SystemLanguage lang in languages)
{
// now I'd like to do smth like this:
string name = lang.Field(sFieldName);
.........
}
The problem is that the "sFieldName" string is built dynamically, so I
cannot use the predefined strongly typed properties!!!
Any bright ideas?
Thanks in advance,
Anton.