This question is locked. New answers and comments are not allowed.
Hi Telerik
I am trying to write a parameterized query like this:
Unfortunately it doesn´t work. It returns only one record where ip.ixs_str is equal to "QX".
The code with const string works great but it is useless for me.
In other words, the first code returns only Ipostr where ixs_str is equal to QX . The second code returns all ipostrs where ixs_str starts with QX.
What am I doing wrong?
Sorry for me english.
Regards
Peter
I am trying to write a parameterized query like this:
string
s2 =
"QX"
;
IQueryable<Ipostr> var2 = from ip
in
this
.DataContext.Ipostrs where ip.ixs_str.StartsWith(s2) select ip;
List<Ipostr> ipostrs2 = var2.ToList();
...
The code with const string works great but it is useless for me.
const
string
s =
"QX"
;
//It works
IQueryable<Ipostr> var = from ip
in
this
.DataContext.Ipostrs where ip.ixs_str.StartsWith(s) select ip;
List<Ipostr> ipostrs = var.ToList();
...
In other words, the first code returns only Ipostr where ixs_str is equal to QX . The second code returns all ipostrs where ixs_str starts with QX.
What am I doing wrong?
Sorry for me english.
Regards
Peter