Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 28, 2013 02:28 AM by Pengzhen Song - MSFT
Member
8 Points
36 Posts
Feb 27, 2013 11:40 AM|LINK
I want to convert sql query to Ado.net Entity Framework linq query.I'm working with Mysql.
Mysql query
Update not as n Inner Join user as a on a.UserId = n.Not_UserId Set Not_Checked='0' Where n.Not_Checked='1' and n.Not_UserId='" + Not_UserId + "'
Ado.net EF linq query
var n5 =from u in db.user join n in db.not on u.UserId equals n.Not_UserId where n.Not_Checked==1 && n.Not_UserId==4 select new { u, n };
I want to update 'n' value.I try to
n5.n
but it doesn't work.How to update 'n' with linq EF ?
Star
8140 Points
837 Posts
Microsoft
Feb 28, 2013 02:28 AM|LINK
Hi,
I see the good answer in http://stackoverflow.com/questions/15112201/linq-entity-framework-update-query .
But I want to say is that here is a sample about insert/update/delete operation with linq EF. Please refer
http://vatsal-desai.blogspot.com/2011/04/linq-to-entity-framework-tutorial.html
Hope it can help you.
fr3d
Member
8 Points
36 Posts
Linq to entities update joined table
Feb 27, 2013 11:40 AM|LINK
I want to convert sql query to Ado.net Entity Framework linq query.I'm working with Mysql.
Mysql query
Ado.net EF linq query
I want to update 'n' value.I try to
but it doesn't work.How to update 'n' with linq EF ?
Pengzhen Son...
Star
8140 Points
837 Posts
Microsoft
Re: Linq to entities update joined table
Feb 28, 2013 02:28 AM|LINK
Hi,
I see the good answer in http://stackoverflow.com/questions/15112201/linq-entity-framework-update-query .
But I want to say is that here is a sample about insert/update/delete operation with linq EF. Please refer
http://vatsal-desai.blogspot.com/2011/04/linq-to-entity-framework-tutorial.html
Hope it can help you.
Feedback to us
Develop and promote your apps in Windows Store