I am trying to query data with Linq using LinqPad, update it and submit changes back to database. Unfortunately I get error on myobject.Email that Email field is not exists. Why I can’t access Email field?
var myobject = from u in Users where u.Email == "myolde@email.com" select u;
myobject.First();
myobject.Email = "mynew@mail.com";
SubmitChanges();
You’re trying to access collection’s field. You might want to access first object: