-
Notifications
You must be signed in to change notification settings - Fork 6
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
contacts management proposal #1623
base: develop
Are you sure you want to change the base?
Conversation
OutOfSchool/OutOfSchool.BusinessLogic/Models/Workshops/WorkshopCreateUpdateDto.cs
Outdated
Show resolved
Hide resolved
OutOfSchool/OutOfSchool.BusinessLogic/Services/ContactsService.cs
Outdated
Show resolved
Hide resolved
OutOfSchool/OutOfSchool.BusinessLogic/Services/ContactsService.cs
Outdated
Show resolved
Hide resolved
OutOfSchool/OutOfSchool.BusinessLogic/Services/ContactsService.cs
Outdated
Show resolved
Hide resolved
OutOfSchool/OutOfSchool.BusinessLogic/Services/ContactsService.cs
Outdated
Show resolved
Hide resolved
|
||
public void ProcessCreate(TEntity existingEntity, TDto dto) | ||
{ | ||
existingEntity.Contacts = mapper.Map<List<Contacts>>(dto.Contacts); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No checks for duplicates
OutOfSchool/OutOfSchool.BusinessLogic/Services/ContactsService.cs
Outdated
Show resolved
Hide resolved
OutOfSchool/OutOfSchool.BusinessLogic/Services/ContactsService.cs
Outdated
Show resolved
Hide resolved
OutOfSchool/OutOfSchool.BusinessLogic/Services/ContactsService.cs
Outdated
Show resolved
Hide resolved
OutOfSchool/OutOfSchool.BusinessLogic/Services/Database/WorkshopService.cs
Show resolved
Hide resolved
OutOfSchool/OutOfSchool.BusinessLogic/Services/Database/WorkshopService.cs
Outdated
Show resolved
Hide resolved
await ChangeTeachers(currentWorkshop, dto.Teachers ?? new List<TeacherDTO>()).ConfigureAwait(false); | ||
await ChangeTeachers(currentWorkshop, dto.Teachers ?? []).ConfigureAwait(false); | ||
|
||
contactsService.ProcessUpdate(currentWorkshop, dto); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be part of ChangeTeachers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not done - was it missed or were there any reasons?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VadymLevkovskyi Teachers are not related to contacts, as we're providing contacts of the workshop itself, not its teachers. Also later teachers will be completely changed to new employees
, so instead of adding teachers as value objects they are going to be completely separate and indepentent entity.
OutOfSchool/OutOfSchool.Common/Enums/SocialNetworkContactType.cs
Outdated
Show resolved
Hide resolved
OutOfSchool/OutOfSchool.DataAccess/Models/ContactInfo/ContactsAddress.cs
Outdated
Show resolved
Hide resolved
OutOfSchool/OutOfSchool.DataAccess/Models/ContactInfo/PhoneNumber.cs
Outdated
Show resolved
Hide resolved
OutOfSchool/OutOfSchool.DataAccess/Models/ContactInfo/SocialNetwork.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented a bit. Mainly about naming and stricter typing
272eb50
to
614c2a5
Compare
Quality Gate failedFailed conditions |
Note
This is only a part for changes for approach review
Question: Current approach does not expose Ids and uses content comparison. It might lead to deletion and creation of new records in db, e.g., change one letter in email => delete old record and create new. If it's ok - we can leave it as it is simpler than managing Ids.