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

Adds entity CreateAsync prototype on Repo/AppController #295

Merged
merged 5 commits into from
Feb 14, 2019

Conversation

rducom
Copy link
Contributor

@rducom rducom commented Dec 20, 2018

Resolve #252

@codecov-io
Copy link

codecov-io commented Dec 20, 2018

Codecov Report

Merging #295 into master will decrease coverage by 0.59%.
The diff coverage is 37.5%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #295     +/-   ##
=========================================
- Coverage   89.81%   89.22%   -0.6%     
=========================================
  Files         104      104             
  Lines        2868     2877      +9     
  Branches      299      299             
=========================================
- Hits         2576     2567      -9     
- Misses        198      215     +17     
- Partials       94       95      +1
Impacted Files Coverage Δ
src/Rdd.Domain/Models/RestCollection.cs 83.17% <0%> (-9.54%) ⬇️
src/Rdd.Application/Controllers/AppController.cs 90.47% <69.23%> (-9.53%) ⬇️
src/Rdd.Domain/Models/ReadOnlyRestCollection.cs 84.37% <0%> (-12.6%) ⬇️
....Web/Serialization/Serializers/EntitySerializer.cs 94.11% <0%> (-1.34%) ⬇️
.../Rdd.Web/Serialization/UrlProviders/UrlProvider.cs 93.93% <0%> (-0.51%) ⬇️
....Web/Serialization/Serializers/ObjectSerializer.cs 100% <0%> (ø) ⬆️
src/Rdd.Infra/Storage/ReadOnlyRepository.cs 100% <0%> (ø) ⬆️
src/Rdd.Infra/Storage/InMemoryStorageService.cs 91.66% <0%> (+0.43%) ⬆️
src/Rdd.Infra/Storage/EFStorageService.cs 95.52% <0%> (+0.44%) ⬆️
...b/Serialization/Serializers/BaseClassSerializer.cs 100% <0%> (+8.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cacdfb4...2dd8e4a. Read the comment docs.

Copy link
Contributor

@nfaugout-lucca nfaugout-lucca left a comment

Choose a reason for hiding this comment

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

For me that is not a acceptable solution, because the 2 CreateAsync methods are too similar but work with very different inputs (candidates vs entities).

At least it should be renamed CreateEntitiesFromCandidatesAsync and CreateEntitiesAsync for instance, to avoid confusion.

But, as we said some weeks ago, what we should really do is get rid of Candidates on the Domain layer, and trash the actual CreateAsync method, and replace it with your new method.

What you could do, now that we follow semver, is :

  • put this code into a v3.0.1 or v3.1 since there is no breaking change
  • make an issue for the v4.0 with my below introduction, in order not to forget to refactor all that stuff

@rducom
Copy link
Contributor Author

rducom commented Jan 31, 2019

@nfaugout in order to avoid confusion, the type system is here.
It's perfectly acceptable (and recommended) to have multiple methods with the same name and different types, when theses methods have the same intend.
There are already multiple open issues about this pb : #238, #252

Copy link
Contributor

@nfaugout-lucca nfaugout-lucca left a comment

Choose a reason for hiding this comment

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

Naming things... 😄

src/Rdd.Application/Controllers/AppController.cs Outdated Show resolved Hide resolved
src/Rdd.Domain/Models/RestCollection.cs Outdated Show resolved Hide resolved
@nfaugout-lucca
Copy link
Contributor

@rducom I would name everything result instead of added or updated, because it brings nothing more than just naming a variable, and the same word added for one or multiple entities, I don't like it personnaly.

@rducom rducom dismissed nfaugout-lucca’s stale review February 14, 2019 08:01

Nico your points are adressed, I merge this one

@rducom rducom merged commit 4c5078b into master Feb 14, 2019
@rducom rducom deleted the simple.prototypes branch February 14, 2019 08:02
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.

4 participants