I'm trying to make a query that grabs a single row from an SQL database and updates it.
TableA
AId
AValue
TableB
BId
AId
BValue
Ok, so TableA and TableB are linked by AId. I want to select a row in TableB based on AValue using a join. The following query is what I have and only grabs a value from TableB based on AId, I just don't know how to grab a row from TableB using AValue. I know you would need to use a join, but I'm not sure how to accomplish that.
var row = DbObject.TableB.Single(x => x.AId == 1)
row.BValue = 1;
DbObject.SubmitChanges();