Feat: Se agregan servicios y controladores para ABM de suscriptores
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using GestionIntegral.Api.Data.Repositories.Suscripciones;
|
||||
using GestionIntegral.Api.Dtos.Suscripciones;
|
||||
|
||||
namespace GestionIntegral.Api.Services.Suscripciones
|
||||
{
|
||||
public class FormaPagoService : IFormaPagoService
|
||||
{
|
||||
private readonly IFormaPagoRepository _formaPagoRepository;
|
||||
|
||||
public FormaPagoService(IFormaPagoRepository formaPagoRepository)
|
||||
{
|
||||
_formaPagoRepository = formaPagoRepository;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<FormaPagoDto>> ObtenerTodos()
|
||||
{
|
||||
var formasDePago = await _formaPagoRepository.GetAllAsync();
|
||||
return formasDePago.Select(fp => new FormaPagoDto
|
||||
{
|
||||
IdFormaPago = fp.IdFormaPago,
|
||||
Nombre = fp.Nombre,
|
||||
RequiereCBU = fp.RequiereCBU
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user