SqlServerValueGenerationScenariosTest.BlogContextKeyColumnWithDefaultValue SqlServerValueGenerationScenariosTest.BlogContextKeyColumnWithDefaultValue Class

Definition

public class BlogContextKeyColumnWithDefaultValue : SqlServerValueGenerationScenariosTest.ContextBase, IDisposable, IInfrastructure<IServiceProvider>
Public Class BlogContextKeyColumnWithDefaultValue
    Inherits SqlServerValueGenerationScenariosTest.ContextBase
    Implements IDisposable, IInfrastructure(Of IServiceProvider)
Inheritance
System.ObjectSystem.Object
SqlServerValueGenerationScenariosTest.BlogContextKeyColumnWithDefaultValueSqlServerValueGenerationScenariosTest.BlogContextKeyColumnWithDefaultValue
Implements
System.IDisposableSystem.IDisposable IInfrastructure<System.IServiceProvider>IInfrastructure(Of System.IServiceProvider)

Constructors

BlogContextKeyColumnWithDefaultValue(String) BlogContextKeyColumnWithDefaultValue(String)

public BlogContextKeyColumnWithDefaultValue(string databaseName)
Public Sub New(databaseName As String)
Parameters
databaseName
System.String System.String

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)

OnModelCreating(ModelBuilder) OnModelCreating(ModelBuilder)

protected override void OnModelCreating(ModelBuilder modelBuilder)
Protected Overrides Sub OnModelCreating(modelBuilder As ModelBuilder)
Parameters
modelBuilder
ModelBuilder ModelBuilder
Overrides

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)

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)

Properties

Blogs Blogs

ChangeTracker ChangeTracker

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

(Inherited from DbContext)

ConcurrentBlogs ConcurrentBlogs

Database Database

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

(Inherited from DbContext)

FullNameBlogs FullNameBlogs

GuidBlogs GuidBlogs

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)

Model Model

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

(Inherited from DbContext)

NullableKeyBlogs NullableKeyBlogs