Pārlūkot izejas kodu

Merge commit 'refs/pull/314/head' of https://gitee.com/zuohuaijun/Admin.NET into next

zuohuaijun 4 gadi atpakaļ
vecāks
revīzija
bd093bb6ad

+ 3 - 2
Admin.NET/Admin.NET.Web.Entry/wwwroot/Template/Service.cs.vm

@@ -1,4 +1,4 @@
-using Furion.DependencyInjection;
+using Furion.DependencyInjection;
 using Furion.DynamicApiController;
 using Furion.DynamicApiController;
 using Mapster;
 using Mapster;
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.AspNetCore.Mvc;
@@ -111,7 +111,8 @@ if (@column.ColumnKey == "True"){
             @:var entity = await _rep.GetFirstAsync(u => u.@(@column.ColumnName) == input.@(@column.ColumnName));
             @:var entity = await _rep.GetFirstAsync(u => u.@(@column.ColumnName) == input.@(@column.ColumnName));
 }
 }
 }
 }
-            await _rep.DeleteAsync(entity);
+            await _rep.Context.Updateable(entity).FakeDelete().ExecuteCommandAsync();   //假删除
+            //await _rep.DeleteAsync(entity);   //真删除
         }
         }
 
 
         /// <summary>
         /// <summary>