Domanda

      db.Update<Luna.Record.TB_ITEM>().Set(
                x => x.ITEM_DURABILITY == Convert.ToInt32(quantity))
                .Where(x => x.ITEM_POSITION == Convert.ToInt32(position))
                .Execute();

Come posso aggiungere un clausola AND questo è come sembra in SQL pianura:

UPDATE TB_ITEM
SET ITEM_DURABITLITY=@quantity
WHERE ITEM_POSITION=@position AND CHARACTER_IDX=@charidx
È stato utile?

Soluzione

.Where(x => x.ITEM_POSITION == Convert.ToInt32(position)
            && x.CHARACTER_IDX == Convert.ToInt32(charidx)) 
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top