31 lines
No EOL
655 B
C#
31 lines
No EOL
655 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()
|
|
{
|
|
|
|
}*/
|
|
|
|
// GET Katalog/{id}
|
|
[HttpGet("{id}", Name ="GetBookByID")]
|
|
public ActionResult <IEnumerable<Book>> GetBookByID(int id)
|
|
{
|
|
var bookItem = _repository.GetBookByID(id);
|
|
if (bookItem != null)
|
|
{
|
|
return
|
|
}
|
|
}
|
|
}
|
|
|
|
} |