Leaf Input functional

This commit is contained in:
2016-02-03 13:39:50 -05:00
parent 54b9eacd09
commit 10f7a23d31
11 changed files with 299 additions and 45 deletions
@@ -0,0 +1,32 @@
using System.ComponentModel.DataAnnotations;
using AutoMapper;
namespace LeafWeb.Web.ViewModels.LeafInput
{
public class ConfirmViewModel
{
private static readonly IMapper Mapper;
public string Name { get; set; }
public string Email { get; set; }
public string Identifier { get; set; }
public string SiteId { get; set; }
public string[] Files { get; set; }
static ConfirmViewModel()
{
var config =
new MapperConfiguration(cfg =>
{
cfg.CreateMap<CreateViewModel, ConfirmViewModel>();
});
Mapper = config.CreateMapper();
}
public ConfirmViewModel(CreateViewModel createViewModel, string[] files)
{
Mapper.Map(createViewModel, this);
Files = files;
}
}
}