Open LmG7119 opened 3 years ago
I can get defaults from the strongly typed lib: https://github.com/ErikEJ/EFCorePowerTools/blob/master/src/GUI/ErikEJ.EntityFrameworkCore.SqlServer.Dacpac/Scaffolding/SqlServerDacpacDatabaseModelFactory.cs
I'm not much of the C# developer
I tried it like this defaultExpression = col.GetReferenced(Column.Expression).FirstOrDefault().Name.ToString(); Any other help would be appreciated.
Thanks
You need to get all the default constraints, and find the one for the current column.
I'm using t4 C3 script to create some SQL server object dynamically from predefined tables. Everything works except default values Example
I need to generate persist table as follows
I can generate everything but not default('') Here is the snippet