EntityFramework-Reverse-POCO-Code-First-Generator
EntityFramework-Reverse-POCO-Code-First-Generator copied to clipboard
Supply SQL for computed columns
Add computed columns SQL, so that migrations can fully create the database elsewhere. See MSDN
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Person>()
.Property(p => p.DisplayName)
.HasComputedColumnSql("[LastName] + ', ' + [FirstName]");
}
+1 for this feature. Have to now run a script after a migrate to create computed columns. Its a bit awkward.
Thanks Kevin