prueba tecnica

This commit is contained in:
Alejandro
2025-06-15 18:29:25 +02:00
parent 9758ee0bc6
commit d97e55a83f
127 changed files with 6488 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
using AutoMapper;
using Npgsql;
using ProximaContracts.Domain.Rates.DTOs.Responses;
using ProximaContracts.Domain.Rates.Entities;
namespace ProximaContracts.Domain.Contracts.Mappings
{
public class RateProfile : Profile
{
public RateProfile()
{
#region Rates All
CreateMap<NpgsqlDataReader, RateEntity>()
.ForMember(d => d.Id, o => o.MapFrom(s => s.GetInt32(s.GetOrdinal("Id"))))
.ForMember(d => d.Name, o => o.MapFrom(s => s.GetString(s.GetOrdinal("Name"))))
.ForMember(d => d.Price, o => o.MapFrom(r => r.GetDecimal(r.GetOrdinal("Price"))))
;
CreateMap<RateEntity, GetAllRatesDto>();
#endregion Rates All
}
}
}