commit change all folder

This commit is contained in:
Kham
2021-11-24 09:28:37 +11:00
parent 1131159112
commit 4e3cc0750c
58 changed files with 151 additions and 92 deletions
+27
View File
@@ -0,0 +1,27 @@
using AutoMapper;
using CarParkValidationAPI.Entities;
using CarParkValidationAPI.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace CarParkValidationAPI.Datas
{
public class AutoMapping: Profile
{
public AutoMapping()
{
CreateMap<ConcessionType, ConcessionTypeDto>()
.ForMember( dest => dest.Id, opt => opt.MapFrom(src => src.ConcessionTypeID))
.ForMember(dest => dest.Description , opt=> opt.MapFrom(src=> src.ConcessionDesc))
.ForMember(dest => dest.Display, opt => opt.MapFrom(src => src.ConcessionDisplay))
.ReverseMap();
CreateMap<ValidationPoint, ValidationPointDto>()
.ForMember(dest => dest.Id , opt => opt.MapFrom(src => src.ValidationPointID))
.ForMember(dest => dest.Display, opt => opt.MapFrom(src => src.DisplayName))
.ReverseMap();
/*etc...*/
}
}
}