Subsonic 3.0 UPDATE, plusieurs conditions
-
26-09-2019 - |
Question
db.Update<Luna.Record.TB_ITEM>().Set(
x => x.ITEM_DURABILITY == Convert.ToInt32(quantity))
.Where(x => x.ITEM_POSITION == Convert.ToInt32(position))
.Execute();
Comment puis-je ajouter une clause AND c'est la façon dont il ressemble en SQL:
UPDATE TB_ITEM
SET ITEM_DURABITLITY=@quantity
WHERE ITEM_POSITION=@position AND CHARACTER_IDX=@charidx
La solution
.Where(x => x.ITEM_POSITION == Convert.ToInt32(position)
&& x.CHARACTER_IDX == Convert.ToInt32(charidx))
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow