Closed giancarlomelis closed 4 years ago
Hi. I'm trying to use Like-queries as shown in documetation:
using (var con = new SqlConnection()) { var products = con.Select<Product>(p => p.Name == "Awesome bike"); var products = con.Select<Product>(p => p.Created < new DateTime(2014, 12, 31) && p.InStock > 5); }
but when i try to execute this script:
using (DbContext ctx = new DbContext()) { IEnumerable<User> users = ctx.Connection.Select<User>(u => u.UserName.StartsWith("op", StringComparison.InvariantCultureIgnoreCase)); usersBindingSource.DataSource = users.ToList(); }
I'm getting this exeption:
An expression of non-boolean type specified in a context where condition is expected, near '('
I'm using Dommel.1.11.0
Thanks.
StartsWith with only works in Dommel 2.0. Also don't pass the StringComparison options.
StartsWith
StringComparison
Hi. I'm trying to use Like-queries as shown in documetation:
but when i try to execute this script:
I'm getting this exeption:
An expression of non-boolean type specified in a context where condition is expected, near '('
I'm using Dommel.1.11.0
Thanks.