You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OSI-API/OSI-API/Controllers/ExpensesController.cs

47 lines
1.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace OSI.API.Controllers
{
[Route("api/v{version:apiVersion}/[controller]")]
[ApiController]
public class ExpensesController : ControllerBase
{
// GET: api/Expenses
[HttpGet]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
// GET: api/Expenses/5
[HttpGet("{id}")]
public string Get(int id)
{
return "value";
}
// POST: api/Expenses
[HttpPost]
public void Post([FromBody] string value)
{
}
// PUT: api/Expenses/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] string value)
{
}
// DELETE: api/Expenses/5
[HttpDelete("{id}")]
public void Delete(int id)
{
}
}
}