Hi all,
i am using entity framework to access the Db in my project
here i want to update two entity(table) by clicking a update button
Dim xx As entityname = objContext.entityname.Where(Function(c) c.Rowid = intRowId And c.Type = intType).SingleOrDefault
If (true) Then
If Not IsNothing(xx) Then
xx.intrr = xx.intrr + intss
xx.intaa = xx.intaa - intpp
objContext.entityname.ApplyCurrentValues(xx)
objContext.SaveChanges()
End If
Dim yy As entityname1 = objContext.entityname1.Where(Function(d) d.Rowid = intRowId And d.Type = intType).SingleOrDefault
If Not IsNothing(yy) Then
yy.intxx = yy.xx + intyy
yy.inttt = yy.inttt - intss
objContext.entityname1.ApplyCurrentValues(yy)
objContext.SaveChanges()
End If
End If
the above denoting to update two entity in same functionality
here i can able to update the entityname entity
and i also can able to update the entityname 1 entity
but i cannot able to update only one field in entityname1 (for example yy.inttt)
so that i saw the design of the table in the SQL, to check the default binding values
since there is no anyvalue to bind default
what is the mistake done by me
please let me know