public LoadSheddingInputsContainer GetLoadSheddingInputs(int ldzId, string gasDayFlag)
var models = Mapper.Map<InputsContainer>(domain);//here exception showing
my code about mapping...
Mapper.CreateMap<Shared.Domain.Inputs, Shared.Models.LoadSheddingInputs>();
Mapper.CreateMap<Shared.Models.Inputs, Shared.Domain.LoadSheddingInputs>()
public InputsContainer GetInputs(int ldzId, string gasDayFlag)
{
var domain = this.Repository.GetInputs(ldzId, gasDayFlag);
var models = Mapper.Map<InputsContainer>(domain);
return models;
}
//mapper initilizer
FluentMapper.Initialize(a => a.AddMap(new InputsMapper()));
/// <summary>
/// Inputs Mapper
/// </summary>
public class InputsMapper : EntityMap<Inputs>
{
/// <summary>
/// Initializes a new instance of the <see cref="InputsMapper"/> class.
/// </summary>
public InputsMapper()
{
Map(p => p.Time).ToColumn("add");
Map(p => p.Firm).ToColumn("add");
Map(p => p.SO).ToColumn("add");
Map(p => p.Hours).ToColumn("add");
}
}
}