Files
LeafWeb/Web/ViewModels/LeafInput/ConfirmViewModel.cs
T
2016-02-03 13:39:50 -05:00

32 lines
710 B
C#

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