56 lines
1.3 KiB
C#
56 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using skydiveLogs_api.Business.Interface;
|
|
using skydiveLogs_api.DataContract;
|
|
|
|
namespace skydiveLogs_api.Controllers
|
|
{
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public class AircraftController : ControllerBase
|
|
{
|
|
public AircraftController(IAircraftService aircraftService)
|
|
{
|
|
_aircraftService = aircraftService;
|
|
}
|
|
|
|
// GET: api/Aircraft
|
|
[HttpGet]
|
|
public IEnumerable<AircraftResp> Get()
|
|
{
|
|
return new AircraftResp[] { "value1", "value2" };
|
|
}
|
|
|
|
// GET: api/Aircraft/5
|
|
[HttpGet("{id}", Name = "Get")]
|
|
public AircraftResp Get(int id)
|
|
{
|
|
return "value";
|
|
}
|
|
|
|
// POST: api/Aircraft
|
|
[HttpPost]
|
|
public void Post([FromBody] AircraftReq value)
|
|
{
|
|
}
|
|
|
|
// PUT: api/Aircraft/5
|
|
[HttpPut("{id}")]
|
|
public void Put(int id, [FromBody] AircraftReq value)
|
|
{
|
|
}
|
|
|
|
// DELETE: api/ApiWithActions/5
|
|
[HttpDelete("{id}")]
|
|
public void Delete(int id)
|
|
{
|
|
}
|
|
|
|
private readonly IAircraftService _aircraftService;
|
|
}
|
|
}
|