hanyadikhetvan-dotnethf/HanyadikHetVan/Controllers/HanyadikHetVanController.cs

36 lines
875 B
C#
Raw Normal View History

2021-05-03 15:56:38 +02:00
using HanyadikHetVan.DTO;
using HanyadikHetVan.Services;
using Microsoft.AspNetCore.Mvc;
namespace HanyadikHetVan.Controllers
{
[ApiController]
[Route("api/hanyadikhetvan")]
public class HanyadikHetVanController : ControllerBase
{
private readonly HanyadikHetVanJsonService _jsonservice;
private readonly HanyadikHetVanService _service;
public HanyadikHetVanController(HanyadikHetVanJsonService jsonservice, HanyadikHetVanService service)
{
_jsonservice = jsonservice;
_service = service;
}
2021-05-17 22:53:27 +02:00
[HttpGet("json")]
2021-05-03 15:56:38 +02:00
[Consumes("application/json")]
public HanyadikHetVanDTO GetJson()
{
return _jsonservice.HanyadikHetVan();
}
[HttpGet]
public int Get()
{
return _service.HanyadikHetVan();
}
}
}