Hi again !
In a form I load and object, I do some modification ad I save it . Everything is ok. IF I load again the same object, the properties shows the old values not the new ones even in the database are the new values. So I trace the querry and the select return the new values but for some reason the object inside is not updated. If i close the program and reloaded again, yes , it brings the correct values.
So is something wrong with the cache.
The database is sql server and the code is :
public class DA_WoJobDetail
private static WoDbContext _localContext = new WoDbContext();
public static WO_JobDetail GetWoJob(string JobNo)
WO_JobDetail obj = (from c in _localContext.WO_JobDetails where c.JobNo == JobNo select c).FirstOrDefault();
Before , in the last version it worked just fine.
So can you tell me what is wrong ?
And a question. When I return an object is lazy loading, so only when I use it it will query the database. Can you tell me how I can loaded imediatelly ,in the moment I execute the linq ?
Thank you !