T
teddysnips
I am just getting to grips with LINQ to SQL and my first attempt is to
create a Search form.
I need the LINQ to generate SQL like this:
SELECT * FROM CustomerTable WHERE Surname LIKE 'S%'
My LINQ so far looks like this:
var cons = from c in db.CustomerTable
where c.Surname LIKE 'S%'
select c;
However, it doesn't like "LIKE". How might I mimic this in LINQ? I
should add that I'm hardly the world's most experienced C# programmer
either!
Thanks
Edward
create a Search form.
I need the LINQ to generate SQL like this:
SELECT * FROM CustomerTable WHERE Surname LIKE 'S%'
My LINQ so far looks like this:
var cons = from c in db.CustomerTable
where c.Surname LIKE 'S%'
select c;
However, it doesn't like "LIKE". How might I mimic this in LINQ? I
should add that I'm hardly the world's most experienced C# programmer
either!
Thanks
Edward