Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using Manifesto.Models.InputModels;
- using Microsoft.AspNetCore.Mvc;
- namespace Manifesto.WebApi
- {
- [Route("api/rentals")]
- public class BookController
- {
- [HttpGet]
- [Route("")]
- // CHANGE TO IActionResult
- public void GetAllRentals([FromQuery] string category)
- {
- //
- return;
- }
- [HttpGet]
- [Route("{id:int}")]
- public void GetBookById(int id)
- {
- return;
- }
- [HttpPost]
- [Route("")]
- public void CreateBook([FromBody] BookInputModel book)
- {
- if (book == null)
- {
- throw new ArgumentNullException(nameof(book));
- }
- return;
- }
- [HttpPut]
- [Route("{id:int}")]
- public void UpdateBookById(int id)
- {
- return;
- }
- [HttpDelete]
- [Route("{id:int}")]
- public void DeleteRentalById(int id)
- {
- return;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement