My database has such structure:
I have dates of plays and number of seats. The idea is to create list of reservations (with one date and different seats depending on number of seats) for each new date. OrderId is null until somebody will not buy a ticket on this seat.
I used code first and now i don't know how to do this:
- Create trigger in sql server database
- Do it in controller every time when new date is added
Or, maybe, this sctructure is bad. In this case, does exists better way?