using Microsoft.AspNetCore.Mvc; namespace API_development.Controllers { [Route("/api/[controller]")] [ApiController] [ApiExplorerSettings(GroupName = "Действия с хобби")] public class DeleteHobbiController : ControllerBase { ApplicationContext db = new ApplicationContext(); [HttpDelete] public IActionResult Index(Hobbies hobbi) { db.tbHobbies.Remove(hobbi); db.SaveChanges(); return Ok(); } } }