I am currently setting up my database in my Asp.Net 5 project using the framework 7 entity previously with EF 6, when I wanted to make some of my columns null, I would use:
modelBuilder.Entity<Article>().Property(t => t.ArticleDateModified).IsOptional();
But it seems that it is IsOptionalno longer part of EF7, I was wondering how I can achieve the same using EF7?
Edit:
Marc's answer is really correct, at first I did, although this worked because I found something like IsOptional:
builder.Entity<Article>().Property(t => t.ArticleDateModified).IsRequired(false);
But after I checked some test without it, it set the database column to zero, as I marked it as nullable in my domain model:
public DateTime? ArticleDateModified { get; set; }
, DateTime non-nullable IsRequired(false), :
"ArticleDateModified" "Article" nullable/optional, - "DateTime", NULL. /, , /.
, IsRequired(false) , , , , - ?