1
Answer

EF Query Increment one field

Dave Bell

Dave Bell

1y
556
1

I am trying to update the likecount field using below query. Howver, it gives sytax error

_context.quicknotes.Where(x=>x.Id == request.id).ExecuteUpdate(b=>b.SetProperty(u=>u.LikeCount,u.LikeCount+1));

What is the right way to do it?

Answers (1)