Loading

随笔分类 -  c sharp

摘要:DateTime 输出字符串 带 T,结尾 +08:00 $"{DateTime.Now:O}"; // 2020-12-20T16:11:18.2353338+08:00 $"{DateTime.Now.ToLocalTime():O}"; // 2020-12-20T16:21:55.58129 阅读全文
posted @ 2020-12-20 16:36 myEsn2E9 阅读(381) 评论(0) 推荐(0)
摘要:public string GetTickCount(DateTime? startTime, DateTime? endTime) { if (!startTime.HasValue) return null; string tickCount = null; if (!endTime.HasVa 阅读全文
posted @ 2020-11-17 19:00 myEsn2E9 阅读(221) 评论(0) 推荐(0)
摘要:post link 阅读全文
posted @ 2020-04-10 21:55 myEsn2E9 阅读(128) 评论(0) 推荐(0)
摘要:参考地址:https://stackoverflow.com/questions/54987776/ldap-connection-error-the-server-is-not-operational-when-connecting-to-port 1. 测试 LDAPS 网络连接Test-Net 阅读全文
posted @ 2019-12-26 18:07 myEsn2E9 阅读(1443) 评论(0) 推荐(0)
摘要:原理: 伪代码: 纠正代码(调用 GetNewOrderId 的地方需要改成调用这个): 阅读全文
posted @ 2019-11-07 11:33 myEsn2E9 阅读(196) 评论(0) 推荐(0)
摘要:添加 nuget 包: Microsoft.EntityFrameworkCore.Design Microsoft.EntityFrameworkCore.SqlServer Microsoft.EntityFrameworkCore.Tools 继承接口: IDesignTimeDbContex 阅读全文
posted @ 2019-06-25 16:06 myEsn2E9 阅读(217) 评论(0) 推荐(0)
摘要:posts Exploring .NET Core's SourceLink - Stepping into the Source Code of NuGet packages you don't own official dotnet/sourcelink 阅读全文
posted @ 2019-04-24 15:25 myEsn2E9 阅读(157) 评论(0) 推荐(0)
摘要:private static void RegisterClassMaps(IEnumerable clrTypes) { foreach (var clrType in clrTypes) { if (clrTypes.Any(x => x.BaseType.Name == clrT... 阅读全文
posted @ 2019-04-03 16:08 myEsn2E9 阅读(239) 评论(0) 推荐(0)
摘要:https://www.codementor.io/pmbanugo/working-with-mongodb-in-net-part-3-skip-sort-limit-and-projections-oqfwncyka 阅读全文
posted @ 2019-04-02 16:00 myEsn2E9 阅读(92) 评论(0) 推荐(0)
摘要:Windows8.1-KB2919442-x64 Windows8.1-KB2919355-x64 vc_redist.x64 dotnet-sdk-2.2.103-win-x64 非必要 dotnet-hosting-2.2.1-win 阅读全文
posted @ 2019-01-31 11:25 myEsn2E9 阅读(197) 评论(0) 推荐(0)
摘要:动态 Linq.Expresssion select 阅读全文
posted @ 2019-01-14 17:12 myEsn2E9 阅读(521) 评论(0) 推荐(0)
摘要:添加 nuget 包 Microsoft.AspNetCore.Antiforgery 修改 Startup 类代码 public void ConfigureServices(IServiceCollection services) { services.AddAntiforgery(option 阅读全文
posted @ 2018-10-22 15:12 myEsn2E9 阅读(11) 评论(0) 推荐(0)
摘要:添加 nuget 包 ReturnTrue.AspNetCore.Identity.Anonymous 修改 Startup 类代码 public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFact 阅读全文
posted @ 2018-10-22 14:49 myEsn2E9 阅读(8) 评论(0) 推荐(0)
摘要:修改 web.config 文件 阅读全文
posted @ 2018-08-02 17:26 myEsn2E9 阅读(141) 评论(0) 推荐(0)
摘要:(from context in retDataList group context by context.ResourceId into g select g.OrderByDescending(b => b.OperationSum).First()).ToList(); 阅读全文
posted @ 2018-03-13 19:02 myEsn2E9 阅读(378) 评论(0) 推荐(0)
摘要:这里只写了 string 类型的,其他类型需要转换的再加 if 条件就好了 阅读全文
posted @ 2018-03-12 17:31 myEsn2E9 阅读(589) 评论(0) 推荐(0)
摘要:安装 .net framework sdk 7.1 新建一个 .net framework 7.1 的程序 在程序的工程文件的第一个 PropertyGroup 节点下加入以下子属性 <LangVersion>latest</LangVersion> 编码 static async Task Mai 阅读全文
posted @ 2018-01-25 11:55 myEsn2E9 阅读(263) 评论(0) 推荐(0)
摘要:如一个项目存在多个DbCcontext且使用同一个数据库,关系: 无关联:donetcli指定具体的dbcontext类名生成migration classes 有关联:子dbcontext继承父dbcontext,然后只用生成子dbcontext 如一个项目只有一个dbcontext,可以只用在程 阅读全文
posted @ 2017-06-21 00:18 myEsn2E9 阅读(2158) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2017-03-28 16:51 myEsn2E9 阅读(10) 评论(1) 推荐(0)
摘要:这位大哥写的博客很清楚了,我就不重复了. http://www.cnblogs.com/caodaiming/p/4156476.html 错误解决 http://blog.csdn.net/goldenfish1919/article/details/51791347 .net 最简洁的swagg 阅读全文
posted @ 2017-03-14 11:13 myEsn2E9 阅读(920) 评论(3) 推荐(0)