DbContextAttribute Sınıf
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Bir sınıfın DbContext ait olduğu değeri tanımlar. Örneğin, bu öznitelik bir geçişin hangi bağlam için geçerli olduğunu belirlemek için kullanılır. Ayrıca, tasarım zamanı araçları için bir derlemede kullanılan bağlamları belirtmek için de kullanılır.
[System.AttributeUsage(System.AttributeTargets.Class)]
public sealed class DbContextAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, AllowMultiple=true)]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class DbContextAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Class)]
[System.Runtime.CompilerServices.Nullable(0)]
public sealed class DbContextAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class)>]
type DbContextAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class, AllowMultiple=true)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type DbContextAttribute = class
inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Class)>]
[<System.Runtime.CompilerServices.Nullable(0)>]
type DbContextAttribute = class
inherit Attribute
Public NotInheritable Class DbContextAttribute
Inherits Attribute
- Devralma
-
DbContextAttribute
- Özellikler
Açıklamalar
Daha fazla bilgi ve örnek için bkz. EF Core ile veritabanı şemalarını yönetme .
Oluşturucular
| Veri Akışı Adı | Description |
|---|---|
| DbContextAttribute(Type) |
DbContextAttribute sınıfının yeni bir örneğini başlatır. |
Özellikler
| Veri Akışı Adı | Description |
|---|---|
| ContextType |
İlişkili bağlamı alır. |