Это была моя модель, и все работало нормально:
public class events1
{
public int Id { get; set; }
public string title { get; set; }
public string report { get; set; }
public string image1 { get; set; }
public string image2 { get; set; }
}
Я только что добавил эту строку в мою модель для конкретной цели, и теперь, когда я добавляю новую миграцию, она говорит:
Значение не может быть нулевым. Имя параметра: entitySet
Моя новая модель выглядит так:
public class events1
{
public int Id { get; set; }
public string title { get; set; }
public string report { get; set; }
public string image1 { get; set; }
public string image2 { get; set; }
//the new added line//
public HttpPostedFileBase ImageFile { get; set; }
}