C#C
C#3y ago
SWEETPONY

✅ Is it possible to lock method by id?

I don't know how to write correct question but I would try to describe my idea. Let's say I have this method:
public async Task<Dto> Modify(string groupId) => ..
Imagine there are 4 people inside 1 group and someone called Modify method. Modification was started, it takes 1 minute for example and someone from this group called Modify method again.

I want to deny the second user to use Modify method because first user didn't get the response. How can I do it?
Was this page helpful?