Imagine that I have 100 users list in the database and I have 100 or more console applications that are using those users to log in somewhere. I need to use a unique user per application, I must not use the same user more than one application. How can I solve this issue, what is the best practice or pattern for that? That means a record has to read only one application/service I have also some requirements/restrictions as I mentioned below.
You didn't say what database you use or what database access technology stack. In general, you need the following:
Any decent database and any decent driver should be able to do that.
If I don't misunderstand you, you need a class that handles 1:1 relationships between two classes. Maybe you can find an answer here?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.