Work on a bill invoice project, in this project there is the Emissor
entity.
- My database Sql-Server may have multiple emitters.
- Each issuer can issue its invoices.
- Each invoice must have a unique, sequential number.
- This sequence is zeroed by sender.
- For each issuer the invoice number has to be sequential and unique. However for the database this number may be repeated.
- Issuer A has notes issued from 1 to 100
- Issuer B has notes issued from 1 to 50
- If there is a new issuer, this invoice number sequence will start with 1.
I thought about using the Sequence of Sql-Server , however with Sequence
I can not keep a sequence separated by sender.
I use Entity Framework 6 .
Would anyone have any idea how to solve this?