I have created this table:
public string Name { get; set; } public string Description { get; set; } [ForeignKey("CityId")] public City City { get; set; } public int CityId { get; set; } Now I like to set CityId to null, and I Try this:
public string Name { get; set; } public string Description { get; set; } [ForeignKey("CityId")] public City City { get; set; } public int? CityId { get; set; } But when I create the new migration in Package Manager Console (add-migration Curso_CityIdNullable), the migration generated is empty...
public override void Up() { } public override void Down() { } Any help?? Thanks