+
Skip to content

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
Contributor

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

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载