1

I'm trying to use EntityFramework to work with MySQL database from c#. I'm using MySQL Connector 6.3.3, but i'm unable to use the linq syntax like

context.Items.Where(x => x.Id == 3)

I only see the following overload for Where:

Where(string predicate, params ObjectParameter[] parameters);

Is there a provider or something that could help me to work with MySQL from EF with the common LINQ syntax?

1 Answer 1

3

You're probably missing a using clause :

using System.Linq;

You also need to reference the System.Core assembly.

The Where method you're seeing is the one defined by the ObjectSet<T>. The other query operators are extension methods defined in the System.Linq.Queryable class

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

1 Comment

Thanks a lot! Shame on me - forgot such an easy thing :)

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.