Pergunta

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

Como vou adicionar uma cláusula e é assim que se parece com SQL simples:

UPDATE TB_ITEM
SET ITEM_DURABITLITY=@quantity
WHERE ITEM_POSITION=@position AND CHARACTER_IDX=@charidx
Foi útil?

Solução

.Where(x => x.ITEM_POSITION == Convert.ToInt32(position)
            && x.CHARACTER_IDX == Convert.ToInt32(charidx)) 
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top