Ask Your Question
2

Why does Add Migration fail to acknowledge modifications when I append a new class to my model, but works correctly when I append a new property to an existing class?

asked 2021-10-31 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-07-02 01:00:00 +0000

scrum gravatar image

Add Migration fails to acknowledge modifications when a new class is added to the model because it only looks for changes within its set of pre-existing classes. When a new class is added, it is not included in the set of classes that Add Migration is looking for changes in, hence it fails to acknowledge the modification.

However, when a new property is added to an existing class, Add Migration can identify the modification because it is already looking at that class and can recognize the new addition to its properties.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-10-31 11:00:00 +0000

Seen: 12 times

Last updated: Jul 02 '21