Entity-framework dbcontext implementation.
Properties
ConfigureNucleusEntities
Property
Get or set whether Nucleus entities should be configured in OnModelCreating.
DbContextConfigurator
Property
HttpContextAccessor
Property
Http context accessor.
LoggerFactory
Property
Logger factory used to provide logger instance for entity-framework logs.
Methods
AttachClone<T>
(<T>) Method
AttachClone<T> (<T> original)
Create a shallow copy of the original object and add it to the DbContext change tracker.
ConfigureConventions
(ModelConfigurationBuilder) Method
ConfigureConventions (ModelConfigurationBuilder configurationBuilder)
Apply model conventions which apply to all entities.
CurrentUserId
CurrentUserId ()
Retrieve the currently logged-on user's Id
DeleteAsync
(String, String) Method
DeleteAsync (String table, String parameters)
Execute a DELETE statement against the specified table using the specified parameters in the WHERE clause.
Parameters
| Name |
Type |
|
table
|
String
|
|
parameters
|
System.Collections.Generic.IDictionary<System.String
|
DelimitIdentifier
(String) Method
DelimitIdentifier (String name)
Delimit an identifier (table name, column name ) according to the rules of the current database provider.
ManageSpecialColumns
ManageSpecialColumns ()
Automatically set properties of entity framework entries before adding or updating the database.
OnConfiguring
(DbContextOptionsBuilder) Method
OnConfiguring (DbContextOptionsBuilder options)
Call the dbContextConfigurator to configure this DbContext.
OnModelCreating
(ModelBuilder) Method
OnModelCreating (ModelBuilder builder)
SaveChanges
SaveChanges ()
Save changes made in this context, after updating audit properties.
SaveChanges
(Boolean) Method
SaveChanges (Boolean acceptAllChangesOnSuccess)
Save changes made in this context, after updating audit properties.
Parameters
| Name |
Type |
|
acceptAllChangesOnSuccess
|
Boolean
|
SaveChanges<TEntity>
SaveChanges<TEntity> ()
Save changes made in this context for the type specified by TEntity ONLY, after updating audit properties.
SaveChangesAsync
(Boolean, CancellationToken) Method
SaveChangesAsync (Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
Save changes made in this context, after updating audit properties.
SaveChangesAsync<TEntity>
SaveChangesAsync<TEntity> ()
Save changes made in this context for the type specified by TEntity ONLY, after updating audit properties.