Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate seed data #9989

Merged
merged 1 commit into from Oct 6, 2017
Merged

Validate seed data #9989

merged 1 commit into from Oct 6, 2017

Conversation

AndriySvyryd
Copy link
Member

Fix issues with discriminators and table splitting

Part of #629

{
foreach (var entity in data)
{
if (entity.GetType() != typeof(TEntity))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entity.GetType() != typeof(TEntity) [](start = 20, length = 35)

This has to be an exact match?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, because any derived property will be ignored

{
foreach (var stateManager in new[] { _sourceStateManager, _targetStateManager })
{
if (stateManager == null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (stateManager == null) [](start = 15, length = 26)

When is one of the state manager's null?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when there's no corresponding model
i.e. Starting from an empty DB or going to one

/// directly from your code. This API may change or be removed in future releases.
/// </summary>
public delegate SharedTableEntryMap<TValue> SharedTableEntryMapFactory<TValue>(SharedTableEntryValueFactory<TValue> valueFactory);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Named delegates are...unusual...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funcs were too cumbersome

Fix issues with discriminators and table splitting

Part of #629
@AndriySvyryd AndriySvyryd merged commit f711fbe into dev Oct 6, 2017
@AndriySvyryd AndriySvyryd deleted the SeedValidation branch October 6, 2017 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants