hanyadikhetvan-dotnethf/HanyadikHetVan/Controllers/V1/HanyadikHetVanController.cs
Torma Kristóf 8347b10401
All checks were successful
continuous-integration/drone/push Build is passing
big day behind me
2021-05-19 04:33:53 +02:00

39 lines
1006 B
C#

using HanyadikHetVan.DTO;
using HanyadikHetVan.Services;
using Microsoft.AspNetCore.Mvc;
using System.Net.Mime;
namespace HanyadikHetVan.Controllers.V1
{
[ApiController]
[ApiVersion("1.0")]
[Route("api/v{version:apiVersion}/[controller]")]
public class HanyadikHetVanController : Controller
{
private readonly HanyadikHetVanJsonService _jsonservice;
private readonly HanyadikHetVanService _service;
public HanyadikHetVanController(HanyadikHetVanJsonService jsonservice, HanyadikHetVanService service)
{
_jsonservice = jsonservice;
_service = service;
}
[HttpGet("json")]
[Consumes(MediaTypeNames.Application.Json)]
[Produces(MediaTypeNames.Application.Json)]
public HanyadikHetVanDTO GetJson()
{
return _jsonservice.HanyadikHetVan();
}
[HttpGet]
public int Get()
{
return _service.HanyadikHetVan();
}
}
}