E
E
embiid2021-06-27 13:16:15
ASP.NET
embiid, 2021-06-27 13:16:15

How to make a counter for the remaining space for the event?

I ask for advice, push on the thought please. There is some sort of tournament. The tournament has a maximum number of participants. You need to display how many people have registered there and how many are left.

1) There is no "alreadyRegistered" column in the table as such. If you add it, what should it be? I do not quite understand, for example, what should be stored there? Should it be some kind of fk per user? (if only the site user can register).

2) Do I need to create a method for this controller in order for the user to register?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ronald McDonald, 2021-06-27
@Zoominger

1) There is no "alreadyRegistered" column in the table as such.

Why is it on the table? A person registers, a record is created in the database. If the same person with the same data registers, then you should simply check if there is such a person in the database and return an error to the registrant if yes.
2) Do I need to create a method for this controller in order for the user to register?

With the current formulation of the question - xs. Maybe it's enough just to take the data from the field and drive it into the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question