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,12 +1,12 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using Heroic.AutoMapper;
using AutoMapper;
using InventoryTraker.Web.Core;
namespace InventoryTraker.Web.Models
{
public class InventoryAddForm : IMapTo<Inventory>
public class InventoryAddForm
{
[HiddenInput(DisplayValue = false)]
[Required]
@@ -22,5 +22,13 @@ namespace InventoryTraker.Web.Models
public DateTime AddedDate { get; set; }
public string Memo { get; set; }
public class AutoMapperProfile : Profile
{
public AutoMapperProfile()
{
CreateMap<InventoryAddForm, Inventory>();
}
}
}
}