1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-12-22 07:17:22 +01:00

Fix mappings.

This commit is contained in:
Nick Blakely 2020-08-08 00:07:11 -07:00
parent 6e2ebf67af
commit ee0fddbf6d
3 changed files with 4 additions and 7 deletions

View File

@ -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; }
}
}

View File

@ -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);

View File

@ -2,7 +2,6 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputType>Library</OutputType>
</PropertyGroup>
<ItemGroup>