Merge branch 'master' of L:\ICT\DISTBIDS\Git_Source_Code\CarParkValidation\CarParkValidationAPI
This commit is contained in:
@@ -1,31 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 16
|
|
||||||
VisualStudioVersion = 16.0.31515.178
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CarParkValidationAPI", "CarParkValidationAPI\CarParkValidationAPI.csproj", "{FCD8F53F-967F-4E66-B42C-DCD0C83B2670}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommonAD", "..\..\CommonAD\CommonAD.csproj", "{8FB49AA9-08D8-400E-BA06-250C479A2296}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{FCD8F53F-967F-4E66-B42C-DCD0C83B2670}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{FCD8F53F-967F-4E66-B42C-DCD0C83B2670}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{FCD8F53F-967F-4E66-B42C-DCD0C83B2670}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{FCD8F53F-967F-4E66-B42C-DCD0C83B2670}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{8FB49AA9-08D8-400E-BA06-250C479A2296}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{8FB49AA9-08D8-400E-BA06-250C479A2296}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{8FB49AA9-08D8-400E-BA06-250C479A2296}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{8FB49AA9-08D8-400E-BA06-250C479A2296}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {B6C27BFF-4D28-4CB3-954C-F3B6C100B5EC}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -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...*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user