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