`public class ListingProjects_ver2{ [System.ComponentModel.DataAnnotations.Key] [Required] public int? Id { get; set; } [Required] public string? ListingName { get; set; } [NotMapped] [Display(Name = "ListingImage")] [DataType(DataType.Upload)] public IFormFile? ListingImage { get; set; } /*This one has linked to my cshtml*/ public string? ListingImageFilePath { get; set; }}
`public class ListingProjects_ver2{ [System.ComponentModel.DataAnnotations.Key] [Required] public int? Id { get; set; } [Required] public string? ListingName { get; set; } [NotMapped] [Display(Name = "ListingImage")] [DataType(DataType.Upload)] public IFormFile? ListingImage { get; set; } /*This one has linked to my cshtml*/ public string? ListingImageFilePath { get; set; }}
I think this error is a beginner's mistake, I miss out something. But I need your help to find out why my cshtml does not recognise ListingImage from the model class. Could anyone point me in the right direction?