prueba tecnica
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user