Hi
I have Location class & Location View Model . Can the same be done thru Single class.
public class Location { public Location() { CreatedOn = DateTime.Now; LastUpdatedOn = DateTime.Now; }
[Key] [Required(ErrorMessage = "Id can not be blank.")]
[Display(Name = "Id")] public string Id { get; set; }
public string Description { get; set; }
}
Virtual Model public class MyViewModel { public List<Location> Locations { get; set; } public Location Location { get; set; } }