I have a web site (MVC5, C#5, .Net4.5) which I want to operate similarly to something like an airline flights site when checking out a product, as inventory is limited and specific.
For example: I select a flight, that flight is held for 10 minutes. If I finish reservation before 10 minutes, that flight is reserved for me and the hold obviously is removed.
If I instead just close my browser, what should I do to release that hold even if the user's session is gone before the timer is done?
The information is in an MSSQL table (productId, holdEnds[datetime]) as to when the hold should be released.
Is there any other way than a SQL job which would poll that table every minute for any holds that need to be released? I'd love to be able to schedule a piece of code to run at a specific datetime from within my controller.