2023-06-26 14:02:04 +07:00
|
|
|
|
using BMA.EHR.Application.Repositories;
|
2023-06-26 10:15:50 +07:00
|
|
|
|
using BMA.EHR.Domain.Common;
|
2023-06-26 14:02:04 +07:00
|
|
|
|
using Microsoft.AspNetCore.Http;
|
2023-06-05 20:22:51 +07:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BMA.EHR.MetaData.Service.Controllers
|
|
|
|
|
|
{
|
2023-06-26 14:02:04 +07:00
|
|
|
|
[Route("api/[controller]")]
|
2023-06-26 10:15:50 +07:00
|
|
|
|
[ApiController]
|
|
|
|
|
|
public class PrefixController : BaseController
|
|
|
|
|
|
{
|
2023-06-26 14:02:04 +07:00
|
|
|
|
private readonly PrefixRepository _repository;
|
2023-06-05 20:22:51 +07:00
|
|
|
|
|
2023-06-26 14:02:04 +07:00
|
|
|
|
public PrefixController(PrefixRepository repository)
|
2023-06-26 10:15:50 +07:00
|
|
|
|
{
|
2023-06-26 14:02:04 +07:00
|
|
|
|
_repository = repository;
|
2023-06-26 10:15:50 +07:00
|
|
|
|
}
|
2023-06-05 20:22:51 +07:00
|
|
|
|
|
2023-06-26 10:15:50 +07:00
|
|
|
|
[HttpGet]
|
2023-06-26 14:02:04 +07:00
|
|
|
|
public async Task<ActionResult<ResponseObject>> Get()
|
2023-06-26 10:15:50 +07:00
|
|
|
|
{
|
2023-06-26 14:02:04 +07:00
|
|
|
|
var data = await _repository.GetAllAsync();
|
|
|
|
|
|
|
2023-06-26 10:15:50 +07:00
|
|
|
|
return Success(data);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-06-05 20:22:51 +07:00
|
|
|
|
}
|