21 lines
734 B
C#
21 lines
734 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Design;
|
|
|
|
namespace OemanTrader.EntityFramework
|
|
{
|
|
public class OemanTraderDbContextFactory : IDesignTimeDbContextFactory<OemanTraderDbContext>
|
|
{
|
|
public OemanTraderDbContext CreateDbContext(string[] args = null)
|
|
{
|
|
var options = new DbContextOptionsBuilder<OemanTraderDbContext>();
|
|
options.UseSqlServer("Server=oemansv7win;Initial Catalog=OemanTraderDB;Persist Security Info=True;User ID=sa;Password=SAOemansv7SA;");
|
|
return new OemanTraderDbContext(options.Options);
|
|
}
|
|
}
|
|
}
|