1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-29 07:47:22 +00:00

.NET Core vs Iris MVC vs Iris (classic API with Handlers)

Former-commit-id: 19c71f41c0864d2f3f36627e9da53b4802a4476b
This commit is contained in:
kataras
2017-08-19 06:06:05 +03:00
parent b96476d100
commit ca4c66d5b4
14 changed files with 292 additions and 2 deletions

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace netcore_mvc.Controllers
{
// ValuesController is the equivalent
// `ValuesController` of the Iris 8.3 mvc application.
[Route("api/[controller]")]
public class ValuesController : Controller
{
// Get handles "GET" requests to "api/values/{id}".
[HttpGet("{id}")]
public string Get(int id)
{
return "value";
}
// Put handles "PUT" requests to "api/values/{id}".
[HttpPut("{id}")]
public void Put(int id, [FromBody]string value)
{
}
// Delete handles "DELETE" requests to "api/values/{id}".
[HttpDelete("{id}")]
public void Delete(int id)
{
}
}
}