From f2040acb7e74d4c1e9a99da6e02885d762c4a8f0 Mon Sep 17 00:00:00 2001 From: MuhammadMangitov Date: Sun, 2 Jun 2024 18:35:44 +0500 Subject: [PATCH] Create Controller Categories --- .../Controllers/CategoriesController.cs | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 WMS.Api/WMS.Api/Controllers/CategoriesController.cs diff --git a/WMS.Api/WMS.Api/Controllers/CategoriesController.cs b/WMS.Api/WMS.Api/Controllers/CategoriesController.cs new file mode 100644 index 0000000..e173dd7 --- /dev/null +++ b/WMS.Api/WMS.Api/Controllers/CategoriesController.cs @@ -0,0 +1,43 @@ +using Microsoft.AspNetCore.Mvc; + +// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 + +namespace WMS.Api.Controllers +{ + [Route("api/[controller]")] + [ApiController] + public class CategoriesController : ControllerBase + { + // GET: api/ + [HttpGet] + public IEnumerable Get() + { + return new string[] { "value1", "value2" }; + } + + // GET api//5 + [HttpGet("{id}")] + public string Get(int id) + { + return "value"; + } + + // POST api/ + [HttpPost] + public void Post([FromBody] string value) + { + } + + // PUT api//5 + [HttpPut("{id}")] + public void Put(int id, [FromBody] string value) + { + } + + // DELETE api//5 + [HttpDelete("{id}")] + public void Delete(int id) + { + } + } +}