MigrationsAssemblyExtensions.GetMigrationId Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a migration identifier in the assembly with the given a full migration name or just its identifier.
public static string GetMigrationId (this Microsoft.EntityFrameworkCore.Migrations.IMigrationsAssembly assembly, string nameOrId);
static member GetMigrationId : Microsoft.EntityFrameworkCore.Migrations.IMigrationsAssembly * string -> string
<Extension()>
Public Function GetMigrationId (assembly As IMigrationsAssembly, nameOrId As String) As String
Parameters
- assembly
- IMigrationsAssembly
The assembly.
- nameOrId
- String
The name or identifier to lookup.
Returns
The identifier of the migration.
Remarks
An exception is thrown if the migration was not found--use FindMigrationId(String) if the migration may not exist.
See Database migrations for more information and examples.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework