Created
July 3, 2022 11:19
-
-
Save MahdiKarimipour/4edbae77352cd1cef58791b12d7ce699 to your computer and use it in GitHub Desktop.
Run Entity Framework Migrations using External SQL Files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class FullAddressFullTextIndex : Migration | |
{ | |
protected override void Up(MigrationBuilder migrationBuilder) | |
{ | |
string sql = GeneralFunctions.ReadSql(typeof(FullAddressFullTextIndex), "20220702124309_FullAddressFullTextIndex.sql"); | |
migrationBuilder.Sql(sql, true); | |
} | |
protected override void Down(MigrationBuilder migrationBuilder) | |
{ | |
string sql = GeneralFunctions.ReadSql(typeof(FullAddressFullTextIndex), "20220702124309_FullAddressFullTextIndexUndo.sql"); | |
migrationBuilder.Sql(sql, true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment