Update automapper

This commit is contained in:
2016-09-24 00:06:34 -04:00
parent f473c64540
commit 6789c1b3b5
32 changed files with 254 additions and 206 deletions
+10 -2
View File
@@ -1,10 +1,10 @@
using System.ComponentModel.DataAnnotations;
using Heroic.AutoMapper;
using AutoMapper;
using InventoryTraker.Web.Core;
namespace InventoryTraker.Web.Models
{
public class UserViewModel : IMapFrom<User>
public class UserViewModel
{
[Required]
[StringLength(128)]
@@ -20,5 +20,13 @@ namespace InventoryTraker.Web.Models
{
return $"UserName: {UserName}, email: {Email}";
}
public class AutoMapperProfile : Profile
{
public AutoMapperProfile()
{
CreateMap<User, UserViewModel>();
}
}
}
}