Hello All,
I am doing this.
public partial class MyModel : BaseNopEntityModel
{
public string Name { get; set; }
public bool Published { get; set; }
}
public partial class MyEntity : BaseEntity
{
public string Name { get; set; }
public bool Published { get; set; }
public bool Deleted { get; set; }
public DateTime CreatedOnUtc { get; set; }
public DateTime UpdatedOnUtc { get; set; }
}
public virtual IActionResult Create(MyModel model, bool continueEditing)
{
var entity = model.ToEntity<MyEntity>();
entity.CreatedOnUtc = DateTime.UtcNow;
entity.UpdatedOnUtc = DateTime.UtcNow;
}
When I am trying to map model to entity through "ToEntity". I am getting this error.
Unmapped properties:
Deleted
CreatedOnUtc
UpdatedOnUtc
Can any one help me how can I use automap in my plugin?
I have see the Category create for reference and write a same code. I can not understand How can I solve this?