HobbiesController.cs 446 B

1234567891011121314151617
  1. using Microsoft.AspNetCore.Mvc;
  2. namespace API_development.Controllers
  3. {
  4. [Route("/api/[controller]")]
  5. [ApiController]
  6. [ApiExplorerSettings(GroupName = "Действия с хобби")]
  7. public class HobbiesController : ControllerBase
  8. {
  9. ApplicationContext db = new ApplicationContext();
  10. [HttpGet]
  11. public IActionResult Index()
  12. {
  13. return Ok(db.tbHobbies.ToList());
  14. }
  15. }
  16. }