using System.Data.Common;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;
namespace EasyDevCore.Database.EntityFrameworkCore
{
///
///
///
///
public class EasyDbContext: DbContext
{
///
/// Initializes a new instance of the class.
///
/// The options for this context.
public EasyDbContext(DbContextOptions options) : base(options)
{
}
///
/// Initializes a new instance of the class.
///
protected EasyDbContext()
{
}
///
///
/// 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.
/// The base implementation does nothing.
///
///
/// In situations where an instance of may or may not have been passed
/// to the constructor, you can use to determine if
/// the options have already been set, and skip some or all of the logic in
/// .
///
///
/// A builder used to create or modify options for this context. Databases (and other extensions)
/// typically define extension methods on this object that allow you to configure the context.
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.AddInterceptors(new EasyCommandInterceptor());
}
}