-
Notifications
You must be signed in to change notification settings - Fork 246
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
Update abstract repository documentation #220
Conversation
{ | ||
var spec = new HeroByNameSpec(name); | ||
|
||
return await repository.GetBySpecAsync(spec); |
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.
At this point in reading this I want to know what happens if there are 2 heroes with this same name...
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.
described how GetBySpecAsync
would handle this above
|
||
public async Task<Hero> GetById(int id) | ||
{ | ||
return await repository.GetByIdAsync(id); |
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.
It's probably worth noting the type of repository
somewhere in this section.
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.
updated
```csharp | ||
public class HeroService | ||
{ | ||
private readonly YourRepository<Hero> repository; |
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.
I see it here. Normally I would make a private field _repository
. In any case maybe show this line up above so folks know what type it is before getting here.
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.
mentioned the field above and changed the field name
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.
Some changes requested
Co-authored-by: Steve Smith <steve@kentsmiths.com>
Fixes #206