P Paul Apr 13, 2010 #1 Hi, Haw can i do this in linQ: UPDATE Table SET Field1="Value" WHERE idTable==5 Thanks
M Martin Honnen Apr 13, 2010 #2 Paul said: Haw can i do this in linQ: UPDATE Table SET Field1="Value" WHERE idTable==5 Click to expand... What are you using exactly, LINQ to SQL, LINQ to Entities? For LINQ to SQL see http://msdn.microsoft.com/en-us/library/bb399339(v=VS.90).aspx
Paul said: Haw can i do this in linQ: UPDATE Table SET Field1="Value" WHERE idTable==5 Click to expand... What are you using exactly, LINQ to SQL, LINQ to Entities? For LINQ to SQL see http://msdn.microsoft.com/en-us/library/bb399339(v=VS.90).aspx
P Patrice Apr 13, 2010 #3 Hi, Haw can i do this in linQ: UPDATE Table SET Field1="Value" WHERE idTable==5 Click to expand... Linq to SQL or EF ? It's best to forget about Sql. It allows to expose your data as *objects* so you just update the object instance and you call the SaveChanges method (or SubmitChanges if Linq To SQL). See : http://msdn.microsoft.com/en-us/library/bb386870.aspx and around for details if Linq To EF... If you have a particular problem in using the doc, you may want to be more explicit about the issue you ran into...
Hi, Haw can i do this in linQ: UPDATE Table SET Field1="Value" WHERE idTable==5 Click to expand... Linq to SQL or EF ? It's best to forget about Sql. It allows to expose your data as *objects* so you just update the object instance and you call the SaveChanges method (or SubmitChanges if Linq To SQL). See : http://msdn.microsoft.com/en-us/library/bb386870.aspx and around for details if Linq To EF... If you have a particular problem in using the doc, you may want to be more explicit about the issue you ran into...
M Mr. Arnold Apr 13, 2010 #4 Paul said: Hi, Haw can i do this in linQ: UPDATE Table SET Field1="Value" WHERE idTable==5 Thanks Click to expand... You have to query for the object out from whatever table it is by idtable == 5. You make changes obj.Field1 = '2'; Context.Savechanges();
Paul said: Hi, Haw can i do this in linQ: UPDATE Table SET Field1="Value" WHERE idTable==5 Thanks Click to expand... You have to query for the object out from whatever table it is by idtable == 5. You make changes obj.Field1 = '2'; Context.Savechanges();