I have a database that contains a one-to-many relationship that is optional. I want to convert this relationship to a one-to-one required. For example one fish is required to have one tank to exist and once that fish has a tank no other fish can have that tank. But one tank can exist without one fish. I would like to preserve the data I have. My issue is when I try doing update-database; entity framework now sees that I have two id's which makes sense because the foreign key would become the primary key of the fish table. How can I work around this?
I'm using C# and SQL Server.