RuntimeEntityType.AddServiceProperty 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
AddServiceProperty(String, PropertyInfo, FieldInfo, PropertyAccessMode) |
Menambahkan properti layanan ke jenis entitas ini. |
AddServiceProperty(String, PropertyInfo, FieldInfo, Type, PropertyAccessMode) |
Menambahkan properti layanan ke jenis entitas ini. |
AddServiceProperty(String, PropertyInfo, FieldInfo, PropertyAccessMode)
Menambahkan properti layanan ke jenis entitas ini.
public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty AddServiceProperty (string name, System.Reflection.PropertyInfo? propertyInfo = default, System.Reflection.FieldInfo? fieldInfo = default, Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField);
abstract member AddServiceProperty : string * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty
override this.AddServiceProperty : string * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty
Public Overridable Function AddServiceProperty (name As String, Optional propertyInfo As PropertyInfo = Nothing, Optional fieldInfo As FieldInfo = Nothing, Optional propertyAccessMode As PropertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField) As RuntimeServiceProperty
Parameter
- name
- String
Nama properti yang akan ditambahkan.
- propertyInfo
- PropertyInfo
Properti CLR yang sesuai atau null
untuk properti bayangan.
- fieldInfo
- FieldInfo
Bidang CLR yang sesuai atau null
untuk properti bayangan.
- propertyAccessMode
- PropertyAccessMode
yang PropertyAccessMode digunakan untuk properti ini.
Mengembalikan
Properti layanan yang baru dibuat.
Berlaku untuk
AddServiceProperty(String, PropertyInfo, FieldInfo, Type, PropertyAccessMode)
Menambahkan properti layanan ke jenis entitas ini.
public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty AddServiceProperty (string name, System.Reflection.PropertyInfo? propertyInfo = default, System.Reflection.FieldInfo? fieldInfo = default, Type? serviceType = default, Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField);
abstract member AddServiceProperty : string * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Type * Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty
override this.AddServiceProperty : string * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Type * Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty
Public Overridable Function AddServiceProperty (name As String, Optional propertyInfo As PropertyInfo = Nothing, Optional fieldInfo As FieldInfo = Nothing, Optional serviceType As Type = Nothing, Optional propertyAccessMode As PropertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField) As RuntimeServiceProperty
Parameter
- name
- String
Nama properti yang akan ditambahkan.
- propertyInfo
- PropertyInfo
Properti CLR yang sesuai atau null
untuk properti bayangan.
- fieldInfo
- FieldInfo
Bidang CLR yang sesuai atau null
untuk properti bayangan.
- serviceType
- Type
Jenis layanan, atau null
untuk menggunakan jenis anggota.
- propertyAccessMode
- PropertyAccessMode
yang PropertyAccessMode digunakan untuk properti ini.
Mengembalikan
Properti layanan yang baru dibuat.
Berlaku untuk
Entity Framework
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk