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

Implement database duplication #671

Merged
merged 8 commits into from
Mar 23, 2023
Merged

Conversation

truongtphat
Copy link
Contributor

No description provided.

@truongtphat truongtphat self-assigned this Mar 23, 2023
@truongtphat truongtphat changed the title Implement duplicated database Implement database duplication Mar 23, 2023
if (await Context.MixDatabase.AnyAsync(p => p.SystemName == SystemName, cancellationToken))
{
IsValid = false;
Errors.Add(new ValidationResult("Database Existed"));
Copy link
Member

Choose a reason for hiding this comment

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

@truongtphat Only invalid when different Id but the same name or the update function will not work
await Context.MixDatabase.AnyAsync(p => p.Id != this.Id && p.SystemName == SystemName, cancellationToken)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to remove this first and find another solution to validate this view model

Copy link
Contributor Author

@truongtphat truongtphat Mar 23, 2023

Choose a reason for hiding this comment

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

@nhathoang989 updated.

@nhathoang989 nhathoang989 merged commit bb010f8 into develop Mar 23, 2023
@nhathoang989 nhathoang989 deleted the features/duplicate_database branch March 23, 2023 14:06
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.

2 participants