Leaf Input functional
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user