hanyadikhetvan/Controllers/HanyadikHetVanController.cs

40 lines
952 B
C#
Raw Normal View History

2021-02-09 16:28:13 +01:00
using hanyadikhetvan.DTO;
using Microsoft.AspNetCore.Mvc;
2021-02-08 20:48:10 +01:00
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace hanyadikhetvan.Controllers
{
[ApiController]
2021-02-09 19:20:59 +01:00
[Route("/")]
2021-02-08 20:48:10 +01:00
public class HanyadikHetVanController : ControllerBase
{
2021-02-09 19:20:59 +01:00
private readonly HanyadikHetVanJsonService _jsonservice;
2021-02-09 16:28:13 +01:00
private readonly HanyadikHetVanService _service;
2021-02-09 19:20:59 +01:00
public HanyadikHetVanController(HanyadikHetVanJsonService jsonservice, HanyadikHetVanService service)
2021-02-08 20:48:10 +01:00
{
2021-02-09 19:20:59 +01:00
_jsonservice = jsonservice;
2021-02-09 16:28:13 +01:00
_service = service;
2021-02-08 20:48:10 +01:00
}
[HttpGet]
2021-02-09 19:20:59 +01:00
[Consumes("application/json")]
public HanyadikHetVanDTO GetJson()
{
return _jsonservice.HanyadikHetVan();
}
[HttpGet]
public int Get()
2021-02-08 20:48:10 +01:00
{
2021-02-09 16:28:13 +01:00
return _service.HanyadikHetVan();
2021-02-08 20:48:10 +01:00
}
}
}