0

I tried to query Customers from a SQLite tabel

I want those wher the Customer Number Starts with certain numbers.

The following code throws an error that sqlite does not have a methode ToString.

Can I reach my aim with Cast ?? How?

return conn.Table().Where(v => v.kdnr.ToString().StartsWith(suchtext));

1 Answer 1

1

Using entity framework, that would probably work:

.Where(v=>SqlFunctions.StringConvert(v.kdnr).StartsWith(suchtext))

I dont know about SQLite provider

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! that was what I was looking for and expected it would work! But unfortunately it is not running with sqlite.net as there is no SqlFunctions class.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.