Automap viewmodels for details display
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System.Collections.Generic;
|
||||
using AutoMapper;
|
||||
using LeafWeb.Core.Entities;
|
||||
using LeafWeb.Core.Utility;
|
||||
|
||||
namespace LeafWeb.WebCms.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Descriptive information about the investigator,
|
||||
/// contact information, the site,the sample leaf and its general environmental condition
|
||||
/// </summary>
|
||||
public class LeafInputDataViewModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
[ParseInfo(3, alternateTitle: "Site name in full", exampleValue: "Your site's identifier / name")]
|
||||
public string SiteName { get; set; }
|
||||
|
||||
public LeafInputDataSiteViewModel Site { get; set; }
|
||||
|
||||
public List<LeafInputDataCurveViewModel> Data { get; set; }
|
||||
|
||||
public LeafInputDataViewModel() {}
|
||||
|
||||
public LeafInputDataViewModel(LeafInputData data)
|
||||
{
|
||||
Mapper.Map(data, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user