API

BanksController.cs 641B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using Microsoft.AspNetCore.Mvc;
  6. using UnivateProperties_API.Repository.Banks;
  7. namespace UnivateProperties_API.Controllers.Banks
  8. {
  9. [Route("api/[controller]")]
  10. [ApiController]
  11. public class BanksController : ControllerBase
  12. {
  13. private readonly IBankRepository _repo;
  14. public BanksController(IBankRepository repo)
  15. {
  16. _repo = repo;
  17. }
  18. [HttpGet]
  19. public IActionResult Get()
  20. {
  21. return new OkObjectResult(_repo.GetBanks());
  22. }
  23. }
  24. }