mirror of
https://github.com/DapperLib/Dapper.git
synced 2026-10-18 14:27:47 +08:00
18 lines
533 B
C#
18 lines
533 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Dapper.Tests.Performance.EntityFrameworkCore
|
|
{
|
|
public class EFCoreContext : DbContext
|
|
{
|
|
private readonly string _connectionString;
|
|
|
|
public EFCoreContext(string connectionString)
|
|
{
|
|
_connectionString = connectionString;
|
|
}
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.UseSqlServer(_connectionString);
|
|
|
|
public DbSet<Post> Posts { get; set; }
|
|
}
|
|
} |