meysamhadeli cfab34e3ae - use test-container for integration-test
- improvement test base
2022-12-09 17:12:13 +03:30

17 lines
644 B
C#

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
namespace BuildingBlocks.PersistMessageProcessor.Data;
public class DesignTimeDbContextFactory : IDesignTimeDbContextFactory<PersistMessageDbContext>
{
public PersistMessageDbContext CreateDbContext(string[] args)
{
var builder = new DbContextOptionsBuilder<PersistMessageDbContext>();
builder.UseSqlServer(
"Data Source=.\\sqlexpress;Initial Catalog=PersistMessageDB;Persist Security Info=False;Integrated Security=SSPI;TrustServerCertificate=True");
return new PersistMessageDbContext(builder.Options);
}
}