RuntimeEntityType.AddNavigation Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Overload
AddNavigation(String, RuntimeForeignKey, Boolean, Type, PropertyInfo, FieldInfo, PropertyAccessMode, Boolean) |
Menambahkan properti navigasi baru ke jenis entitas ini. |
AddNavigation(String, RuntimeForeignKey, Boolean, Type, PropertyInfo, FieldInfo, PropertyAccessMode, Boolean, Boolean) |
Menambahkan properti navigasi baru ke jenis entitas ini. |
AddNavigation(String, RuntimeForeignKey, Boolean, Type, PropertyInfo, FieldInfo, PropertyAccessMode, Boolean)
Menambahkan properti navigasi baru ke jenis entitas ini.
public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeNavigation AddNavigation (string name, Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey foreignKey, bool onDependent, Type clrType, System.Reflection.PropertyInfo? propertyInfo = default, System.Reflection.FieldInfo? fieldInfo = default, Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField, bool eagerLoaded = false);
abstract member AddNavigation : string * Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey * bool * Type * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeNavigation
override this.AddNavigation : string * Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey * bool * Type * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeNavigation
Public Overridable Function AddNavigation (name As String, foreignKey As RuntimeForeignKey, onDependent As Boolean, clrType As Type, Optional propertyInfo As PropertyInfo = Nothing, Optional fieldInfo As FieldInfo = Nothing, Optional propertyAccessMode As PropertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField, Optional eagerLoaded As Boolean = false) As RuntimeNavigation
Parameter
- name
- String
Nama properti navigasi lewati untuk ditambahkan.
- foreignKey
- RuntimeForeignKey
Kunci asing yang menentukan hubungan properti navigasi ini akan menavigasi.
- onDependent
- Boolean
Nilai yang menunjukkan apakah properti navigasi didefinisikan pada sisi dependen dari kunci asing yang mendasar.
- clrType
- Type
Jenis nilai yang dipegang navigasi ini.
- propertyInfo
- PropertyInfo
Properti CLR yang sesuai atau null
untuk navigasi bayangan.
- fieldInfo
- FieldInfo
Bidang CLR yang sesuai atau null
untuk navigasi bayangan.
- propertyAccessMode
- PropertyAccessMode
yang PropertyAccessMode digunakan untuk navigasi ini.
- eagerLoaded
- Boolean
Nilai yang menunjukkan apakah navigasi ini harus bersemangat dimuat secara default.
Mengembalikan
Properti navigasi yang baru dibuat.
Berlaku untuk
AddNavigation(String, RuntimeForeignKey, Boolean, Type, PropertyInfo, FieldInfo, PropertyAccessMode, Boolean, Boolean)
Menambahkan properti navigasi baru ke jenis entitas ini.
public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeNavigation AddNavigation (string name, Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey foreignKey, bool onDependent, Type clrType, System.Reflection.PropertyInfo? propertyInfo = default, System.Reflection.FieldInfo? fieldInfo = default, Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField, bool eagerLoaded = false, bool lazyLoadingEnabled = true);
abstract member AddNavigation : string * Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey * bool * Type * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeNavigation
override this.AddNavigation : string * Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey * bool * Type * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode * bool * bool -> Microsoft.EntityFrameworkCore.Metadata.RuntimeNavigation
Public Overridable Function AddNavigation (name As String, foreignKey As RuntimeForeignKey, onDependent As Boolean, clrType As Type, Optional propertyInfo As PropertyInfo = Nothing, Optional fieldInfo As FieldInfo = Nothing, Optional propertyAccessMode As PropertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField, Optional eagerLoaded As Boolean = false, Optional lazyLoadingEnabled As Boolean = true) As RuntimeNavigation
Parameter
- name
- String
Nama properti navigasi yang akan ditambahkan.
- foreignKey
- RuntimeForeignKey
Kunci asing yang menentukan hubungan properti navigasi ini akan menavigasi.
- onDependent
- Boolean
Nilai yang menunjukkan apakah properti navigasi didefinisikan pada sisi dependen dari kunci asing yang mendasar.
- clrType
- Type
Jenis nilai yang dipegang navigasi ini.
- propertyInfo
- PropertyInfo
Properti CLR yang sesuai atau null
untuk navigasi bayangan.
- fieldInfo
- FieldInfo
Bidang CLR yang sesuai atau null
untuk navigasi bayangan.
- propertyAccessMode
- PropertyAccessMode
yang PropertyAccessMode digunakan untuk navigasi ini.
- eagerLoaded
- Boolean
Nilai yang menunjukkan apakah navigasi ini harus bersemangat dimuat secara default.
- lazyLoadingEnabled
- Boolean
Nilai yang menunjukkan apakah navigasi ini harus diaktifkan untuk pemuatan malas.
Mengembalikan
Properti navigasi yang baru dibuat.
Berlaku untuk
Entity Framework