Can we run sql script using code first migrations?
I am new to code first and if I want to save my changes to a SQL script file before update-datab
For .NET Core and EF Core you can do something like this in migrations
protected override void Up(MigrationBuilder migrationBuilder) { var schema = "starter_core"; migrationBuilder.Sql($"INSERT INTO [{schema}].[Roles] ([Name]) VALUES ('transporter')"); }