Dave Bell

Dave Bell

  • NA
  • 108
  • 8.5k

EF Query Increment one field

Jul 23 2023 12:23 PM

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)