generate sql trigger through ef migration code example
Example 1: generate sql trigger through ef migration
migrationBuilder.Sql( "DROP TRIGGER SetUserTimestamp" );
Example 2: generate sql trigger through ef migration
migrationBuilder.Sql( "CREATE TRIGGER SetUserTimestamp AFTER UPDATE ON Users BEGIN UPDATE Users SET Timestamp = randomblob( 8 ) WHERE Id = NEW.Id; END" );