mirror of
https://github.com/ncblakely/GiantsTools
synced 2024-11-24 23:25:37 +01:00
Fix mappings.
This commit is contained in:
parent
6e2ebf67af
commit
ee0fddbf6d
@ -2,12 +2,12 @@
|
|||||||
{
|
{
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
public class ServerInfoWithHostAddress
|
public class ServerInfoWithHostAddress : ServerInfo
|
||||||
{
|
{
|
||||||
public ServerInfo ServerInfo { get; set; }
|
[Required]
|
||||||
|
|
||||||
public string HostIpAddress { get; set; }
|
public string HostIpAddress { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
namespace Giants.Services
|
namespace Giants.Services
|
||||||
{
|
{
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
|
|
||||||
public static class Mapper
|
public static class Mapper
|
||||||
@ -22,6 +19,7 @@
|
|||||||
var config = new MapperConfiguration(cfg => {
|
var config = new MapperConfiguration(cfg => {
|
||||||
cfg.CreateMap<DataContract.ServerInfo, Services.ServerInfo>();
|
cfg.CreateMap<DataContract.ServerInfo, Services.ServerInfo>();
|
||||||
cfg.CreateMap<Services.ServerInfo, DataContract.ServerInfo>();
|
cfg.CreateMap<Services.ServerInfo, DataContract.ServerInfo>();
|
||||||
|
cfg.CreateMap<Services.ServerInfo, DataContract.ServerInfoWithHostAddress>();
|
||||||
});
|
});
|
||||||
|
|
||||||
Instance = new AutoMapper.Mapper(config);
|
Instance = new AutoMapper.Mapper(config);
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Loading…
Reference in New Issue
Block a user