Add project files.
This commit is contained in:
20
OemanTrader.EntityFramework/OemanTraderDbContextFactory.cs
Normal file
20
OemanTrader.EntityFramework/OemanTraderDbContextFactory.cs
Normal file
@ -0,0 +1,20 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user