From ee0fddbf6de83f5aff05413131d5df0ac41fa16d Mon Sep 17 00:00:00 2001 From: Nick Blakely Date: Sat, 8 Aug 2020 00:07:11 -0700 Subject: [PATCH] Fix mappings. --- Giants.DataContract/Contracts/ServerInfoWithHostAddress.cs | 6 +++--- Giants.Services/Mapper/Mapper.cs | 4 +--- Giants.WebApi/Giants.WebApi.csproj | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Giants.DataContract/Contracts/ServerInfoWithHostAddress.cs b/Giants.DataContract/Contracts/ServerInfoWithHostAddress.cs index 30c9484..77c38c2 100644 --- a/Giants.DataContract/Contracts/ServerInfoWithHostAddress.cs +++ b/Giants.DataContract/Contracts/ServerInfoWithHostAddress.cs @@ -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; } } } diff --git a/Giants.Services/Mapper/Mapper.cs b/Giants.Services/Mapper/Mapper.cs index c2c24ae..846f3a1 100644 --- a/Giants.Services/Mapper/Mapper.cs +++ b/Giants.Services/Mapper/Mapper.cs @@ -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(); cfg.CreateMap(); + cfg.CreateMap(); }); Instance = new AutoMapper.Mapper(config); diff --git a/Giants.WebApi/Giants.WebApi.csproj b/Giants.WebApi/Giants.WebApi.csproj index 335e16d..e0853f9 100644 --- a/Giants.WebApi/Giants.WebApi.csproj +++ b/Giants.WebApi/Giants.WebApi.csproj @@ -2,7 +2,6 @@ netcoreapp3.1 - Library