From 2842cca58abf7f81b3bf7803ee52d811e9a8e7fc Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Thu, 18 Apr 2024 10:39:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E9=99=A4=E5=A4=9A=E4=BD=99=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Api/Tiobon.Core.Model.xml | 15 ------ Tiobon.Core.Common/Seed/DBSeed.cs | 48 +++++++++---------- .../Tiobon.Core.IServices.csproj | 2 + Tiobon.Core.Model/Tiobon.Core.Model.csproj | 3 ++ .../Tiobon.Core.Services.csproj | 2 + 5 files changed, 31 insertions(+), 39 deletions(-) diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index b33018ac..63dcefbb 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -1274,16 +1274,6 @@ 金额 - - - Tibug 类别 - - - - - Tibug 博文 - - 用户跟角色关联表 @@ -1515,11 +1505,6 @@ 泛型主键Tkey - - - Tibug 博文 - - 用户跟角色关联表 diff --git a/Tiobon.Core.Common/Seed/DBSeed.cs b/Tiobon.Core.Common/Seed/DBSeed.cs index 06e62bfc..9caa4a8d 100644 --- a/Tiobon.Core.Common/Seed/DBSeed.cs +++ b/Tiobon.Core.Common/Seed/DBSeed.cs @@ -223,36 +223,36 @@ namespace Tiobon.Core.Common.Seed #region Topic - if (!await myContext.Db.Queryable().AnyAsync()) - { - var data = JsonConvert.DeserializeObject>( - FileHelper.ReadFile(string.Format(SeedDataFolder, "Topic"), Encoding.UTF8), setting); - - myContext.GetEntityDB().InsertRange(data); - Console.WriteLine("Table:Topic created success!"); - } - else - { - Console.WriteLine("Table:Topic already exists..."); - } + //if (!await myContext.Db.Queryable().AnyAsync()) + //{ + // var data = JsonConvert.DeserializeObject>( + // FileHelper.ReadFile(string.Format(SeedDataFolder, "Topic"), Encoding.UTF8), setting); + + // myContext.GetEntityDB().InsertRange(data); + // Console.WriteLine("Table:Topic created success!"); + //} + //else + //{ + // Console.WriteLine("Table:Topic already exists..."); + //} #endregion #region TopicDetail - if (!await myContext.Db.Queryable().AnyAsync()) - { - var data = JsonConvert.DeserializeObject>( - FileHelper.ReadFile(string.Format(SeedDataFolder, "TopicDetail"), Encoding.UTF8), setting); - - myContext.GetEntityDB().InsertRange(data); - Console.WriteLine("Table:TopicDetail created success!"); - } - else - { - Console.WriteLine("Table:TopicDetail already exists..."); - } + //if (!await myContext.Db.Queryable().AnyAsync()) + //{ + // var data = JsonConvert.DeserializeObject>( + // FileHelper.ReadFile(string.Format(SeedDataFolder, "TopicDetail"), Encoding.UTF8), setting); + + // myContext.GetEntityDB().InsertRange(data); + // Console.WriteLine("Table:TopicDetail created success!"); + //} + //else + //{ + // Console.WriteLine("Table:TopicDetail already exists..."); + //} #endregion diff --git a/Tiobon.Core.IServices/Tiobon.Core.IServices.csproj b/Tiobon.Core.IServices/Tiobon.Core.IServices.csproj index 186a7a6b..def6c6cf 100644 --- a/Tiobon.Core.IServices/Tiobon.Core.IServices.csproj +++ b/Tiobon.Core.IServices/Tiobon.Core.IServices.csproj @@ -4,6 +4,8 @@ + + diff --git a/Tiobon.Core.Model/Tiobon.Core.Model.csproj b/Tiobon.Core.Model/Tiobon.Core.Model.csproj index 74ca7f26..02ebdf03 100644 --- a/Tiobon.Core.Model/Tiobon.Core.Model.csproj +++ b/Tiobon.Core.Model/Tiobon.Core.Model.csproj @@ -14,6 +14,9 @@ + + + diff --git a/Tiobon.Core.Services/Tiobon.Core.Services.csproj b/Tiobon.Core.Services/Tiobon.Core.Services.csproj index 0532cbb9..6557920a 100644 --- a/Tiobon.Core.Services/Tiobon.Core.Services.csproj +++ b/Tiobon.Core.Services/Tiobon.Core.Services.csproj @@ -12,6 +12,8 @@ + +