c# - How to avoid two different user submitting same request for the same person at the same time -
how avoid 2 different users submitting same request same person @ same time? helpdesk asp.net webforms app sql server backend.
i have transaction block in stored procedure insert request table.
but still when colleague , tested scenario in milliseconds our requests went through choosing same option validate duplicate in stored procedure.
first, need define logic comparing if 2 requests same.
from information gave us, variables can see (a) person (b) time. example, 2 requests considered same, if (a) belong same person id , (b) recorded within x minutes of each other.
however above rule generic , might result in loosing valid requests. suggest following:
- investigate why more 1 user can submit same request. frequency of such cases? reasons happens? knowledge might arrive @ different , better solution.
- check further variables add rule e.g. request type, application.
- if frequency of duplicate requests low, consider using generic rule , whenever detect duplicate, show user, , ask confirmation add or cancel new request.
Comments
Post a Comment