MonsterContext MonsterContext Class

Definition

public abstract class MonsterContext : DbContext, IDisposable, IInfrastructure<IServiceProvider>
Public MustInherit Class MonsterContext
    Inherits DbContext
    Implements IDisposable, IInfrastructure(Of IServiceProvider)
Inheritance
System.ObjectSystem.Object
MonsterContextMonsterContext
Implements
System.IDisposableSystem.IDisposable IInfrastructure<System.IServiceProvider>IInfrastructure(Of System.IServiceProvider)

Constructors

MonsterContext(DbContextOptions) MonsterContext(DbContextOptions)

protected MonsterContext(DbContextOptions options)
Protected Sub New(options As DbContextOptions)
Parameters

Properties

BarcodeDetails BarcodeDetails

public abstract IQueryable<IBarcodeDetail> BarcodeDetails { get; }
Public MustOverride ReadOnly Property BarcodeDetails As IQueryable(Of IBarcodeDetail)
Value
System.Linq.IQueryable<IBarcodeDetail> System.Linq.IQueryable(Of IBarcodeDetail)

Barcodes Barcodes

public abstract IQueryable<IBarcode> Barcodes { get; }
Public MustOverride ReadOnly Property Barcodes As IQueryable(Of IBarcode)
Value
System.Linq.IQueryable<IBarcode> System.Linq.IQueryable(Of IBarcode)

ChangeTracker ChangeTracker

Provides access to information and operations for entity instances this context is tracking.

(Inherited from DbContext)

Complaints Complaints

public abstract IQueryable<IComplaint> Complaints { get; }
Public MustOverride ReadOnly Property Complaints As IQueryable(Of IComplaint)
Value
System.Linq.IQueryable<IComplaint> System.Linq.IQueryable(Of IComplaint)

ComputerDetails ComputerDetails

public abstract IQueryable<IComputerDetail> ComputerDetails { get; }
Public MustOverride ReadOnly Property ComputerDetails As IQueryable(Of IComputerDetail)
Value
System.Linq.IQueryable<IComputerDetail> System.Linq.IQueryable(Of IComputerDetail)

Computers Computers

public abstract IQueryable<IComputer> Computers { get; }
Public MustOverride ReadOnly Property Computers As IQueryable(Of IComputer)
Value
System.Linq.IQueryable<IComputer> System.Linq.IQueryable(Of IComputer)

CustomerInformation CustomerInformation

public abstract IQueryable<ICustomerInfo> CustomerInformation { get; }
Public MustOverride ReadOnly Property CustomerInformation As IQueryable(Of ICustomerInfo)
Value
System.Linq.IQueryable<ICustomerInfo> System.Linq.IQueryable(Of ICustomerInfo)

Customers Customers

public abstract IQueryable<ICustomer> Customers { get; }
Public MustOverride ReadOnly Property Customers As IQueryable(Of ICustomer)
Value
System.Linq.IQueryable<ICustomer> System.Linq.IQueryable(Of ICustomer)

Database Database

Provides access to database related information and operations for this context.

(Inherited from DbContext)

Drivers Drivers

public abstract IQueryable<IDriver> Drivers { get; }
Public MustOverride ReadOnly Property Drivers As IQueryable(Of IDriver)
Value
System.Linq.IQueryable<IDriver> System.Linq.IQueryable(Of IDriver)

IInfrastructure.Instance Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure.Instance

Gets the scoped System.IServiceProvider being used to resolve services.

This property is intended for use by extension methods that need to make use of services not directly exposed in the public API surface.

(Inherited from DbContext)

IncorrectScans IncorrectScans

public abstract IQueryable<IIncorrectScan> IncorrectScans { get; }
Public MustOverride ReadOnly Property IncorrectScans As IQueryable(Of IIncorrectScan)
Value
System.Linq.IQueryable<IIncorrectScan> System.Linq.IQueryable(Of IIncorrectScan)

LastLogins LastLogins

public abstract IQueryable<ILastLogin> LastLogins { get; }
Public MustOverride ReadOnly Property LastLogins As IQueryable(Of ILastLogin)
Value
System.Linq.IQueryable<ILastLogin> System.Linq.IQueryable(Of ILastLogin)

Licenses Licenses

public abstract IQueryable<ILicense> Licenses { get; }
Public MustOverride ReadOnly Property Licenses As IQueryable(Of ILicense)
Value
System.Linq.IQueryable<ILicense> System.Linq.IQueryable(Of ILicense)

Logins Logins

public abstract IQueryable<ILogin> Logins { get; }
Public MustOverride ReadOnly Property Logins As IQueryable(Of ILogin)
Value
System.Linq.IQueryable<ILogin> System.Linq.IQueryable(Of ILogin)

Messages Messages

public abstract IQueryable<IMessage> Messages { get; }
Public MustOverride ReadOnly Property Messages As IQueryable(Of IMessage)
Value
System.Linq.IQueryable<IMessage> System.Linq.IQueryable(Of IMessage)

Model Model

The metadata about the shape of entities, the relationships between them, and how they map to the database.

(Inherited from DbContext)

OrderLines OrderLines

public abstract IQueryable<IOrderLine> OrderLines { get; }
Public MustOverride ReadOnly Property OrderLines As IQueryable(Of IOrderLine)
Value
System.Linq.IQueryable<IOrderLine> System.Linq.IQueryable(Of IOrderLine)

OrderNotes OrderNotes

public abstract IQueryable<IOrderNote> OrderNotes { get; }
Public MustOverride ReadOnly Property OrderNotes As IQueryable(Of IOrderNote)
Value
System.Linq.IQueryable<IOrderNote> System.Linq.IQueryable(Of IOrderNote)

OrderQualityChecks OrderQualityChecks

public abstract IQueryable<IOrderQualityCheck> OrderQualityChecks { get; }
Public MustOverride ReadOnly Property OrderQualityChecks As IQueryable(Of IOrderQualityCheck)
Value
System.Linq.IQueryable<IOrderQualityCheck> System.Linq.IQueryable(Of IOrderQualityCheck)

Orders Orders

public abstract IQueryable<IAnOrder> Orders { get; }
Public MustOverride ReadOnly Property Orders As IQueryable(Of IAnOrder)
Value
System.Linq.IQueryable<IAnOrder> System.Linq.IQueryable(Of IAnOrder)

PageViews PageViews

public abstract IQueryable<IPageView> PageViews { get; }
Public MustOverride ReadOnly Property PageViews As IQueryable(Of IPageView)
Value
System.Linq.IQueryable<IPageView> System.Linq.IQueryable(Of IPageView)

PasswordResets PasswordResets

public abstract IQueryable<IPasswordReset> PasswordResets { get; }
Public MustOverride ReadOnly Property PasswordResets As IQueryable(Of IPasswordReset)
Value
System.Linq.IQueryable<IPasswordReset> System.Linq.IQueryable(Of IPasswordReset)

ProductDetails ProductDetails

public abstract IQueryable<IProductDetail> ProductDetails { get; }
Public MustOverride ReadOnly Property ProductDetails As IQueryable(Of IProductDetail)
Value
System.Linq.IQueryable<IProductDetail> System.Linq.IQueryable(Of IProductDetail)

ProductPhotos ProductPhotos

public abstract IQueryable<IProductPhoto> ProductPhotos { get; }
Public MustOverride ReadOnly Property ProductPhotos As IQueryable(Of IProductPhoto)
Value
System.Linq.IQueryable<IProductPhoto> System.Linq.IQueryable(Of IProductPhoto)

ProductReviews ProductReviews

public abstract IQueryable<IProductReview> ProductReviews { get; }
Public MustOverride ReadOnly Property ProductReviews As IQueryable(Of IProductReview)
Value
System.Linq.IQueryable<IProductReview> System.Linq.IQueryable(Of IProductReview)

ProductWebFeatures ProductWebFeatures

public abstract IQueryable<IProductWebFeature> ProductWebFeatures { get; }
Public MustOverride ReadOnly Property ProductWebFeatures As IQueryable(Of IProductWebFeature)
Value
System.Linq.IQueryable<IProductWebFeature> System.Linq.IQueryable(Of IProductWebFeature)

Products Products

public abstract IQueryable<IProduct> Products { get; }
Public MustOverride ReadOnly Property Products As IQueryable(Of IProduct)
Value
System.Linq.IQueryable<IProduct> System.Linq.IQueryable(Of IProduct)

Resolutions Resolutions

public abstract IQueryable<IResolution> Resolutions { get; }
Public MustOverride ReadOnly Property Resolutions As IQueryable(Of IResolution)
Value
System.Linq.IQueryable<IResolution> System.Linq.IQueryable(Of IResolution)

RsaTokens RsaTokens

public abstract IQueryable<IRsaToken> RsaTokens { get; }
Public MustOverride ReadOnly Property RsaTokens As IQueryable(Of IRsaToken)
Value
System.Linq.IQueryable<IRsaToken> System.Linq.IQueryable(Of IRsaToken)

SmartCards SmartCards

public abstract IQueryable<ISmartCard> SmartCards { get; }
Public MustOverride ReadOnly Property SmartCards As IQueryable(Of ISmartCard)
Value
System.Linq.IQueryable<ISmartCard> System.Linq.IQueryable(Of ISmartCard)

SupplierInformation SupplierInformation

public abstract IQueryable<ISupplierInfo> SupplierInformation { get; }
Public MustOverride ReadOnly Property SupplierInformation As IQueryable(Of ISupplierInfo)
Value
System.Linq.IQueryable<ISupplierInfo> System.Linq.IQueryable(Of ISupplierInfo)

SupplierLogos SupplierLogos

public abstract IQueryable<ISupplierLogo> SupplierLogos { get; }
Public MustOverride ReadOnly Property SupplierLogos As IQueryable(Of ISupplierLogo)
Value
System.Linq.IQueryable<ISupplierLogo> System.Linq.IQueryable(Of ISupplierLogo)

Suppliers Suppliers

public abstract IQueryable<ISupplier> Suppliers { get; }
Public MustOverride ReadOnly Property Suppliers As IQueryable(Of ISupplier)
Value
System.Linq.IQueryable<ISupplier> System.Linq.IQueryable(Of ISupplier)

SuspiciousActivities SuspiciousActivities

public abstract IQueryable<ISuspiciousActivity> SuspiciousActivities { get; }
Public MustOverride ReadOnly Property SuspiciousActivities As IQueryable(Of ISuspiciousActivity)
Value
System.Linq.IQueryable<ISuspiciousActivity> System.Linq.IQueryable(Of ISuspiciousActivity)

Methods

Add(Object) Add(Object)

Begins tracking the given entity, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.

(Inherited from DbContext)

Add(TEntity) Add(Of TEntity)(TEntity)

Inherited from DbContext

AddAsync(Object, CancellationToken) AddAsync(Object, CancellationToken)

Begins tracking the given entity, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.

This method is async only to allow special value generators, such as the one used by 'Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy.SequenceHiLo', to access the database asynchronously. For all other cases the non async method should be used.

(Inherited from DbContext)

AddAsync(TEntity, CancellationToken) AddAsync(Of TEntity)(TEntity, CancellationToken)

Inherited from DbContext

AddRange(IEnumerable) AddRange(IEnumerable(Of Object))

Begins tracking the given entities, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.

(Inherited from DbContext)

AddRange(Object[]) AddRange(Object())

Begins tracking the given entities, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.

(Inherited from DbContext)

AddRangeAsync(IEnumerable, CancellationToken) AddRangeAsync(IEnumerable(Of Object), CancellationToken)

Begins tracking the given entity, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.

This method is async only to allow special value generators, such as the one used by 'Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy.SequenceHiLo', to access the database asynchronously. For all other cases the non async method should be used.

(Inherited from DbContext)

AddRangeAsync(Object[]) AddRangeAsync(Object())

Begins tracking the given entity, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.

This method is async only to allow special value generators, such as the one used by 'Microsoft.EntityFrameworkCore.Metadata.SqlServerValueGenerationStrategy.SequenceHiLo', to access the database asynchronously. For all other cases the non async method should be used.

(Inherited from DbContext)

Attach(Object) Attach(Object)

Begins tracking the given entity in the Unchanged state such that no operation will be performed when SaveChanges() is called.

A recursive search of the navigation properties will be performed to find reachable entities that are not already being tracked by the context. These entities will also begin to be tracked by the context. If a reachable entity has its primary key value set then it will be tracked in the Unchanged state. If the primary key value is not set then it will be tracked in the Added state. An entity is considered to have its primary key value set if the primary key property is set to anything other than the CLR default for the property type.

(Inherited from DbContext)

Attach(TEntity) Attach(Of TEntity)(TEntity)

Inherited from DbContext

AttachRange(IEnumerable) AttachRange(IEnumerable(Of Object))

Begins tracking the given entities in the Unchanged state such that no operation will be performed when SaveChanges() is called.

A recursive search of the navigation properties will be performed to find reachable entities that are not already being tracked by the context. These entities will also begin to be tracked by the context. If a reachable entity has its primary key value set then it will be tracked in the Unchanged state. If the primary key value is not set then it will be tracked in the Added state. An entity is considered to have its primary key value set if the primary key property is set to anything other than the CLR default for the property type.

(Inherited from DbContext)

AttachRange(Object[]) AttachRange(Object())

Begins tracking the given entities in the Unchanged state such that no operation will be performed when SaveChanges() is called.

A recursive search of the navigation properties will be performed to find reachable entities that are not already being tracked by the context. These entities will also begin to be tracked by the context. If a reachable entity has its primary key value set then it will be tracked in the Unchanged state. If the primary key value is not set then it will be tracked in the Added state. An entity is considered to have its primary key value set if the primary key property is set to anything other than the CLR default for the property type.

(Inherited from DbContext)

Dispose() Dispose()

Releases the allocated resources for this context.

(Inherited from DbContext)

Entry(Object) Entry(Object)

Gets an EntityEntry for the given entity. The entry provides access to change tracking information and operations for the entity.

This method may be called on an entity that is not tracked. You can then set the State property on the returned entry to have the context begin tracking the entity in the specified state.

(Inherited from DbContext)

Entry(TEntity) Entry(Of TEntity)(TEntity)

Inherited from DbContext

Equals(Object) Equals(Object)

Inherited from System.Object

Equals(Object, Object) Equals(Object, Object)

Inherited from System.Object

Find(Type, Object[]) Find(Type, Object())

Finds an entity with the given primary key values. If an entity with the given primary key values is being tracked by the context, then it is returned immediately without making a request to the database. Otherwise, a query is made to the dataabse for an entity with the given primary key values and this entity, if found, is attached to the context and returned. If no entity is found, then null is returned.

(Inherited from DbContext)

Find(Object[]) Find(Of TEntity)(Object())

Finds an entity with the given primary key values. If an entity with the given primary key values is being tracked by the context, then it is returned immediately without making a request to the database. Otherwise, a query is made to the dataabse for an entity with the given primary key values and this entity, if found, is attached to the context and returned. If no entity is found, then null is returned.

(Inherited from DbContext)

FindAsync(Type, Object[]) FindAsync(Type, Object())

Finds an entity with the given primary key values. If an entity with the given primary key values is being tracked by the context, then it is returned immediately without making a request to the database. Otherwise, a query is made to the dataabse for an entity with the given primary key values and this entity, if found, is attached to the context and returned. If no entity is found, then null is returned.

(Inherited from DbContext)

FindAsync(Type, Object[], CancellationToken) FindAsync(Type, Object(), CancellationToken)

Finds an entity with the given primary key values. If an entity with the given primary key values is being tracked by the context, then it is returned immediately without making a request to the database. Otherwise, a query is made to the dataabse for an entity with the given primary key values and this entity, if found, is attached to the context and returned. If no entity is found, then null is returned.

(Inherited from DbContext)

FindAsync(Object[]) FindAsync(Of TEntity)(Object())

Finds an entity with the given primary key values. If an entity with the given primary key values is being tracked by the context, then it is returned immediately without making a request to the database. Otherwise, a query is made to the dataabse for an entity with the given primary key values and this entity, if found, is attached to the context and returned. If no entity is found, then null is returned.

(Inherited from DbContext)

FindAsync(Object[], CancellationToken) FindAsync(Of TEntity)(Object(), CancellationToken)

Finds an entity with the given primary key values. If an entity with the given primary key values is being tracked by the context, then it is returned immediately without making a request to the database. Otherwise, a query is made to the dataabse for an entity with the given primary key values and this entity, if found, is attached to the context and returned. If no entity is found, then null is returned.

(Inherited from DbContext)

GetHashCode() GetHashCode()

Inherited from System.Object

GetType() GetType()

Inherited from System.Object

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

OnConfiguring(DbContextOptionsBuilder) OnConfiguring(DbContextOptionsBuilder)

Override this method to configure the database (and other options) to be used for this context. This method is called for each instance of the context that is created.

In situations where an instance of DbContextOptions may or may not have been passed to the constructor, you can use IsConfigured to determine if the options have already been set, and skip some or all of the logic in OnConfiguring(DbContextOptionsBuilder).

(Inherited from DbContext)

OnModelCreating(ModelBuilder) OnModelCreating(ModelBuilder)

Override this method to further configure the model that was discovered by convention from the entity types exposed in DbSet<TEntity> properties on your derived context. The resulting model may be cached and re-used for subsequent instances of your derived context.

(Inherited from DbContext)

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from System.Object

Remove(Object) Remove(Object)

Begins tracking the given entity in the Deleted state such that it will be removed from the database when SaveChanges() is called.

(Inherited from DbContext)

Remove(TEntity) Remove(Of TEntity)(TEntity)

Inherited from DbContext

RemoveRange(IEnumerable) RemoveRange(IEnumerable(Of Object))

Begins tracking the given entity in the Deleted state such that it will be removed from the database when SaveChanges() is called.

(Inherited from DbContext)

RemoveRange(Object[]) RemoveRange(Object())

Begins tracking the given entity in the Deleted state such that it will be removed from the database when SaveChanges() is called.

(Inherited from DbContext)

SaveChanges() SaveChanges()

Saves all changes made in this context to the database.

(Inherited from DbContext)

SaveChanges(Boolean) SaveChanges(Boolean)

Saves all changes made in this context to the database.

(Inherited from DbContext)

SaveChangesAsync(Boolean, CancellationToken) SaveChangesAsync(Boolean, CancellationToken)

Asynchronously saves all changes made in this context to the database.

(Inherited from DbContext)

SaveChangesAsync(CancellationToken) SaveChangesAsync(CancellationToken)

Asynchronously saves all changes made in this context to the database.

(Inherited from DbContext)

SeedUsingFKs(Boolean) SeedUsingFKs(Boolean)

public abstract void SeedUsingFKs(bool saveChanges = true)
Public MustOverride Sub SeedUsingFKs(saveChanges As Boolean = True)
Parameters
saveChanges
System.Boolean System.Boolean

SeedUsingNavigations(Boolean, Boolean, Boolean) SeedUsingNavigations(Boolean, Boolean, Boolean)

public abstract void SeedUsingNavigations(bool dependentNavs, bool principalNavs, bool saveChanges = true)
Public MustOverride Sub SeedUsingNavigations(dependentNavs As Boolean, principalNavs As Boolean, saveChanges As Boolean = True)
Parameters
dependentNavs
System.Boolean System.Boolean
principalNavs
System.Boolean System.Boolean
saveChanges
System.Boolean System.Boolean

SeedUsingNavigationsWithDeferredAdd(Boolean) SeedUsingNavigationsWithDeferredAdd(Boolean)

public abstract void SeedUsingNavigationsWithDeferredAdd(bool saveChanges = true)
Public MustOverride Sub SeedUsingNavigationsWithDeferredAdd(saveChanges As Boolean = True)
Parameters
saveChanges
System.Boolean System.Boolean

Set() Set(Of TEntity)()

Creates a DbSet<TEntity> that can be used to query and save instances of TEntity.

(Inherited from DbContext)

ToString() ToString()

Inherited from System.Object

Update(Object) Update(Object)

Begins tracking the given entity in the Modified state such that it will be updated in the database when SaveChanges() is called.

All properties of the entity will be marked as modified. To mark only some properties as modified, use Attach(Object) to begin tracking the entity in the Unchanged state and then use the returned EntityEntry to mark the desired properties as modified.

A recursive search of the navigation properties will be performed to find reachable entities that are not already being tracked by the context. These entities will also begin to be tracked by the context. If a reachable entity has its primary key value set then it will be tracked in the Modified state. If the primary key value is not set then it will be tracked in the Added state. An entity is considered to have its primary key value set if the primary key property is set to anything other than the CLR default for the property type.

(Inherited from DbContext)

Update(TEntity) Update(Of TEntity)(TEntity)

Inherited from DbContext

UpdateRange(IEnumerable) UpdateRange(IEnumerable(Of Object))

Begins tracking the given entities in the Modified state such that they will be updated in the database when SaveChanges() is called.

All properties of each entity will be marked as modified. To mark only some properties as modified, use Attach(Object) to begin tracking each entity in the Unchanged state and then use the returned EntityEntry to mark the desired properties as modified.

A recursive search of the navigation properties will be performed to find reachable entities that are not already being tracked by the context. These entities will also begin to be tracked by the context. If a reachable entity has its primary key value set then it will be tracked in the Modified state. If the primary key value is not set then it will be tracked in the Added state. An entity is considered to have its primary key value set if the primary key property is set to anything other than the CLR default for the property type.

(Inherited from DbContext)

UpdateRange(Object[]) UpdateRange(Object())

Begins tracking the given entities in the Modified state such that they will be updated in the database when SaveChanges() is called.

All properties of each entity will be marked as modified. To mark only some properties as modified, use Attach(Object) to begin tracking each entity in the Unchanged state and then use the returned EntityEntry to mark the desired properties as modified.

A recursive search of the navigation properties will be performed to find reachable entities that are not already being tracked by the context. These entities will also begin to be tracked by the context. If a reachable entity has its primary key value set then it will be tracked in the Modified state. If the primary key value is not set then it will be tracked in the Added state. An entity is considered to have its primary key value set if the primary key property is set to anything other than the CLR default for the property type.

(Inherited from DbContext)