I\'ve read some tutorials with entity framework 6...
The basics are easy.
using (var context = new MyContext())
{
User u = context.Users.Find(1);
}
<
Thanks to @Grant Winney and @Joe.
Adding using System.Linq;
to the namespace/top of the document where i'm tring the code above fixed the problem.
And using the line above it works for the first item of the list.
User user = (select user from context.Users where user.Username == username select user).First();