摘要: 下载相应dotnet版本捆绑包:https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/6.0.36/dotnet-hosting-6.0.36-win.exe 下载nssm 在nssm目录下 cmd进入控制台 输入 nssm in 阅读全文
posted @ 2024-10-31 15:01 柴油飞机 阅读(157) 评论(0) 推荐(0)
摘要: nuget下载 Microsoft.Web.Administration webServiceName为iis服务名称 public static void IISRecycle(string webServiceName) { try { using (var serverManager = ne 阅读全文
posted @ 2024-10-29 09:30 柴油飞机 阅读(133) 评论(0) 推荐(0)
摘要: internal class Program { static List<string> list=new List<string>() { "A","B","C","D","A","B","C","D" }; static string hiddenEle1 = string.Empty;//第一 阅读全文
posted @ 2024-02-16 15:23 柴油飞机 阅读(2274) 评论(4) 推荐(10)
摘要: 写一个特性类,用来做标记 [AttributeUsage(AttributeTargets.Method)] //只对方法有效 public class ResourceFilterAttribute : Attribute { } 我这里使用了MemoryCache来做缓存,也可以使用字典来做,但 阅读全文
posted @ 2023-11-07 15:32 柴油飞机 阅读(1292) 评论(2) 推荐(7)
摘要: 我们在类中通常会有一个属性为 IsDel来表示软删除或也称逻辑删除,这个属性会导致我们在进行查询操作时,每一次都要 .where(s=>s.IsDel==false) 非常的麻烦。在使用efCore时可以通过配置查询筛选器来很好的解决这个问题。 public class SysUser { publ 阅读全文
posted @ 2023-11-05 10:47 柴油飞机 阅读(777) 评论(3) 推荐(5)
摘要: 从ASP.NET Core 3.0版本开始,SignalR的Hub已经集成到了ASP.NET Core框架中。因此,在更高版本的ASP.NET Core中,不再需要单独引用Microsoft.AspNetCore.SignalR包来使用Hub。 在项目创建一个类继承Hub, 首先是写一个Create 阅读全文
posted @ 2023-11-04 12:27 柴油飞机 阅读(1966) 评论(0) 推荐(5)