Leaf Input Details
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using AutoMapper;
|
||||
using LeafWeb.Core.DAL;
|
||||
using LeafWeb.Core.Entities;
|
||||
|
||||
namespace LeafWeb.WebCms.Models
|
||||
{
|
||||
@@ -36,18 +37,20 @@ namespace LeafWeb.WebCms.Models
|
||||
|
||||
static LeafInputCreate()
|
||||
{
|
||||
Mapper.CreateMap<LeafInputCreate, Core.Entities.LeafInput>()
|
||||
Mapper.CreateMap<LeafInputCreate, LeafInput>()
|
||||
.ForMember(dest => dest.PhotosynthesisType, opt => opt.Ignore());
|
||||
Mapper.CreateMap<LeafInput, LeafInputCreate>()
|
||||
.ForMember(dest => dest.PhotosynthesisType, opt => opt.Ignore());
|
||||
}
|
||||
|
||||
public LeafInputCreate()
|
||||
{
|
||||
//PhotosynthesisType = new SelectListViewModel();
|
||||
PhotosynthesisType = new SelectListViewModel();
|
||||
}
|
||||
|
||||
public Core.Entities.LeafInput GetLeafInput(DataService db)
|
||||
public LeafInput GetLeafInput(DataService db)
|
||||
{
|
||||
var leafInput = new Core.Entities.LeafInput();
|
||||
var leafInput = new LeafInput();
|
||||
Mapper.Map(this, leafInput);
|
||||
|
||||
leafInput.PhotosynthesisType = db.GetPhotosynthesisType(PhotosynthesisType.Selected);
|
||||
|
||||
Reference in New Issue
Block a user