Add WebCms

This commit is contained in:
2016-11-07 12:56:17 -05:00
parent dfe92218f4
commit 15911f33c0
2750 changed files with 365672 additions and 133 deletions
+2 -9
View File
@@ -6,8 +6,6 @@ namespace LeafWeb.Web.ViewModels.LeafInput
{
public class CreateViewModel
{
private static readonly IMapper Mapper;
[Display(Name = "Your name")]
[Required(ErrorMessage = "Name required")]
[RegularExpression(@"[A-Za-z().]+(\s+[A-Za-z().]+)+", ErrorMessage = "Please provide your full name")]
@@ -38,13 +36,8 @@ namespace LeafWeb.Web.ViewModels.LeafInput
static CreateViewModel()
{
var config =
new MapperConfiguration(cfg =>
{
cfg.CreateMap<CreateViewModel, Core.Entities.LeafInput>()
.ForMember(dest => dest.PhotosynthesisType, opt => opt.Ignore());
});
Mapper = config.CreateMapper();
Mapper.CreateMap<CreateViewModel, Core.Entities.LeafInput>()
.ForMember(dest => dest.PhotosynthesisType, opt => opt.Ignore());
}
public Core.Entities.LeafInput GetFileInput(DataService db)