Relative Content

Tag Archive for entity-framework

How to represent an optional-to-optional relationship in a database

I have two types of users: a CRM user and a system user. We have a record of every CRM user, thanks to a nightly sync that we run (so we don’t have to hit the CRM API every time). We have system users that don’t have CRM accounts. We also have CRM users that aren’t in our system. If a system user happens to have a CRM account, we want to link the two accounts together. So, this is an optional-to-optional relationship.

How to represent an optional-to-optional relationship in a database

I have two types of users: a CRM user and a system user. We have a record of every CRM user, thanks to a nightly sync that we run (so we don’t have to hit the CRM API every time). We have system users that don’t have CRM accounts. We also have CRM users that aren’t in our system. If a system user happens to have a CRM account, we want to link the two accounts together. So, this is an optional-to-optional relationship.