@@ -1,6 +1,7 @@
|
||||
|
||||
using Fluid;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using IRaCIS.Core.Test.GenerateFolder;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System;
|
||||
@@ -12,7 +13,7 @@ using System.Text;
|
||||
partial class Program
|
||||
{
|
||||
|
||||
static void Main()
|
||||
static void Main(string[] args)
|
||||
{
|
||||
//发布的目录和项目的目录有区别的
|
||||
var rootPath = AppContext.BaseDirectory.Replace(@"\bin\net8.0\", "").Replace(@"\bin\Release\net8.0\", "");
|
||||
@@ -53,10 +54,8 @@ partial class Program
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
// 要生成的表名数组
|
||||
var tableNames = new List<string> { "Subject", "Order" };
|
||||
var tableNames = new List<string>(args);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -238,10 +237,11 @@ partial class Program
|
||||
|
||||
public void CheckCodeFirst()
|
||||
{
|
||||
var contextOptions = new DbContextOptionsBuilder<IRaCISDBContext>()
|
||||
.UseSqlServer(@"Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true").Options;
|
||||
//var contextOptions = new DbContextOptionsBuilder<TempContext>()
|
||||
// .UseSqlServer(@"Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true").Options;
|
||||
|
||||
using var dbContext = new IRaCISDBContext(contextOptions);
|
||||
//using var dbContext = new TempContext(contextOptions);
|
||||
using var dbContext = new TempContext();
|
||||
|
||||
var dbModel = dbContext.Model;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user