26 lines
		
	
	
		
			828 B
		
	
	
	
		
			C#
		
	
	
	
	
	
		
		
			
		
	
	
			26 lines
		
	
	
		
			828 B
		
	
	
	
		
			C#
		
	
	
	
	
	
|  | 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 | ||
|  |             }); | ||
|  |         } | ||
|  |     } | ||
|  | } |