NewLife/AntJob

作业任务表用单对象缓存没有意义,基本上没有命中率
智能大石头 authored at 2022-12-23 12:25:21
92c3523
Tree
1 Parent(s) 15f3141
Summary: 3 changed files with 16 additions and 4 deletions.
Modified +3 -2
Modified +1 -2
Added +12 -0
Modified +3 -2
diff --git "a/AntJob.Data/Entity/\344\275\234\344\270\232\344\273\273\345\212\241.Biz.cs" "b/AntJob.Data/Entity/\344\275\234\344\270\232\344\273\273\345\212\241.Biz.cs"
index 9a0c107..15629ee 100644
--- "a/AntJob.Data/Entity/\344\275\234\344\270\232\344\273\273\345\212\241.Biz.cs"
+++ "b/AntJob.Data/Entity/\344\275\234\344\270\232\344\273\273\345\212\241.Biz.cs"
@@ -56,8 +56,9 @@ namespace AntJob.Data.Entity
         {
             if (id <= 0) return null;
 
-            // 单对象缓存
-            return Meta.SingleCache[id];
+            //// 单对象缓存
+            //return Meta.SingleCache[id];
+            return Find(_.ID == id);
         }
 
         /// <summary>
Modified +1 -2
diff --git a/Samples/HisAgent/HisAgent.csproj b/Samples/HisAgent/HisAgent.csproj
index a48d5be..202b489 100644
--- a/Samples/HisAgent/HisAgent.csproj
+++ b/Samples/HisAgent/HisAgent.csproj
@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk.Web">
 
   <PropertyGroup>
     <OutputType>Exe</OutputType>
@@ -10,7 +10,6 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
     <PackageReference Include="NewLife.Stardust.Extensions" Version="2.5.2022.1220-beta0113" />
   </ItemGroup>
 
Added +12 -0
diff --git a/Samples/HisAgent/Properties/launchSettings.json b/Samples/HisAgent/Properties/launchSettings.json
new file mode 100644
index 0000000..fbee9db
--- /dev/null
+++ b/Samples/HisAgent/Properties/launchSettings.json
@@ -0,0 +1,12 @@
+{
+  "profiles": {
+    "HisAgent": {
+      "commandName": "Project",
+      "launchBrowser": true,
+      "environmentVariables": {
+        "ASPNETCORE_ENVIRONMENT": "Development"
+      },
+      "applicationUrl": "https://localhost:54050;http://localhost:54051"
+    }
+  }
+}
\ No newline at end of file