MigrationsSqlGenerator.TryGetVersion(IModel, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得用來產生當前遷移的產品版本。 提供者可利用此機制維持與先前版本產生的遷移相容性。
protected virtual bool TryGetVersion(Microsoft.EntityFrameworkCore.Metadata.IModel? model, out string? version);
protected virtual bool TryGetVersion(Microsoft.EntityFrameworkCore.Metadata.IModel model, out string version);
abstract member TryGetVersion : Microsoft.EntityFrameworkCore.Metadata.IModel * string -> bool
override this.TryGetVersion : Microsoft.EntityFrameworkCore.Metadata.IModel * string -> bool
Protected Overridable Function TryGetVersion (model As IModel, ByRef version As String) As Boolean
參數
- model
- IModel
目標型號。
- version
- String
版本。
傳回
true 如果能找回那個版本的話。