Skip to content

phonebook-001 first commit#151

Open
Witch-dev wants to merge 1 commit into
the-csharp-academy:mainfrom
Witch-dev:phonebook-001
Open

phonebook-001 first commit#151
Witch-dev wants to merge 1 commit into
the-csharp-academy:mainfrom
Witch-dev:phonebook-001

Conversation

@Witch-dev

Copy link
Copy Markdown

No description provided.

@TheCSharpAcademy TheCSharpAcademy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Witch-dev Thanks for submitting! Unfortunately we can't approve at the moment as the project has no Readme. Also, since we're here, please address he following issues

PhoneNumber column configuration is wrong. In ContactDbContext, PhoneNumber is first configured as uniqueidentifier, then as nvachar(50). There’s also a typo: it should be nvarchar(50). This should be cleaned up before approval.

Duplicate phone numbers still get added AddContactToDb() checks if a phone number already exists, but it doesn’t return, so the duplicate contact is still inserted.

Name validation is missing Email and phone validation exist, but the name can be empty or whitespace. Add validation for this.

Phone validation can crash phoneUtil.Parse(number, null) can throw on invalid input. Use TryParse instead.

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