-
Notifications
You must be signed in to change notification settings - Fork 0
6 endpoint do dodawania gatunku #18
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
base: master
Are you sure you want to change the base?
Conversation
| { | ||
| return NotFound(); | ||
| } | ||
| return Ok(); |
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.
powinno byc w srodku bloku try
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.
do wyjebki
| public void Add(Genre entity) | ||
| { | ||
| _context.Genres.Add(entity); | ||
| _context.Add(entity); |
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.
wystarczy _context.Genres.Add(..)
| { | ||
| Genre? genre = _context.Genres.Find(id) ?? throw new NotFoundException("Genre "+id+" not found in repository"); | ||
| return genre; | ||
| throw new NotImplementedException(); |
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.
wyjeb
| { | ||
|
|
||
| public ICollection<int> genres_ids { get; set; } | ||
| [JsonIgnore] |
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.
Po co to ?
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.
request do kontrolera książki który do isniejącej książki dodaje gatunki
| public ActionResult Put(int id, [FromBody] AssigneGenreToBookRequest request) | ||
| { | ||
| request.book_id = id; | ||
| _bookService.assigneGenre(request); |
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.
nie musisz w requescie miec pola book_id, powinno byc tak ze serwis assigneGenre przyjmuje request i samo id jako parametry
No description provided.