I am Using EF in My DAL. When I update a Record I have to Query the database using LINQ. This is Done in Performance Cost.
The Question is How to Update Records With out Round trip over all Database and also if I Have an Entity Created from Scratch and is not Attached to any object context how to Update its Values in Existing Entity in the database Without Querying.
Any Help Will be Appreciated.
Ok you can ad the record to datacontext like what i did in my code
im going to just update VisitAmp field in my table
NewBranchRequestTbl is my table
nr is new record
So when we call newBran.SaveChanges();
it just updates VisitAmp in NewBranchRequestTbl