30 lines
627 B
C#
30 lines
627 B
C#
|
using System.Collections.Generic;
|
||
|
using BuecherwurmAPI.Models;
|
||
|
using Microsoft.AspNetCore.Mvc;
|
||
|
|
||
|
namespace BuecherwurmAPI.Controllers
|
||
|
{
|
||
|
[Route("katalog") ]
|
||
|
[ApiController]
|
||
|
public class KatalogController
|
||
|
{
|
||
|
private readonly object _repository;
|
||
|
|
||
|
/*[HttpGet]
|
||
|
public ActionResult<IEnumerable<Book>> GetAllBooks()
|
||
|
{
|
||
|
|
||
|
}*/
|
||
|
|
||
|
[HttpGet("{id}", Name ="GetBookByID")]
|
||
|
public ActionResult <IEnumerable<Book>> GetBookByID(int id)
|
||
|
{
|
||
|
var bookItem = _repository.GetBookByID(id);
|
||
|
if (bookItem != null)
|
||
|
{
|
||
|
return
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|