UsersController.cs 470 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 UsersController : ControllerBase
  8. {
  9. ApplicationContext db = new ApplicationContext();
  10. [HttpGet]
  11. public IActionResult Index()
  12. {
  13. return Ok(db.tbUsers.ToList());
  14. }
  15. }
  16. }