I have a (sample) application with the following code:
public class Posts
{
[Key]
[Required]
public int ID { get; set; }
[Required]
pub
The reason it wasn't allowing nulls because the following:
public int PollID { get; set; }
public virtual Poll Poll { get; set; }
public int PostID { get; set; }
public virtual Post Post { get; set; }
should have been
public int? PollID { get; set; }
public virtual Poll Poll { get; set; }
public int? PostID { get; set; }
public virtual Post Post { get; set; }