随笔分类 -  .Net Core

摘要:译文链接:https://www.infoworld.com/article/3057152/how-to-work-with-action-func-and-predicate-delegates-in-csharp.html?nsdr=true Func 和 Action 是什么,如何使用? C 阅读全文
posted @ 2020-12-02 14:35 94cool 阅读(164) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/sdflysha/p/20200228-csharp-history-code-demo.html 阅读全文
posted @ 2020-03-01 12:01 94cool 阅读(113) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/shanyou/p/12051570.html 阅读全文
posted @ 2020-03-01 09:48 94cool 阅读(111) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/hippieZhou/p/11966373.html 原文地址: ASP.NET-Core-Web-API-Best-Practices-Guide 阅读全文
posted @ 2020-03-01 09:46 94cool 阅读(191) 评论(0) 推荐(0) 编辑
摘要:from:https://docs.microsoft.com/zh-cn/aspnet/core/performance/performance-best-practices?view=aspnetcore-3.1 作者:Mike Rousos 本文提供了有关 ASP.NET Core 的性能最佳 阅读全文
posted @ 2020-02-26 10:06 94cool 阅读(2706) 评论(0) 推荐(0) 编辑
摘要:/// <summary> /// 创建文件路径 /// </summary> /// <param name="filepath"></param> /// <returns></returns> private void CreatePath(string filepath) { if (!Di 阅读全文
posted @ 2019-05-20 10:12 94cool 阅读(301) 评论(0) 推荐(0) 编辑
摘要:1、.Net Core项目【Lails.Server.Demo】发布到目录下Lails.Server.Demo\bin\Release\netcoreapp2.1\publish 2、上面目录下新建文件Dockerfile: # 父镜像 FROM microsoft/dotnet:2.1-aspne 阅读全文
posted @ 2018-10-18 17:28 94cool 阅读(2054) 评论(0) 推荐(0) 编辑
摘要:Newtonsoft.Json.JsonSerializerSettings setting = new Newtonsoft.Json.JsonSerializerSettings(); Newtonsoft.Json.JsonSerializerSettings setting = new Ne 阅读全文
posted @ 2018-09-15 12:20 94cool 阅读(8471) 评论(0) 推荐(3) 编辑
摘要:分页的总页数算法 设总记录数:totalRecord每页最大记录数:maxResult总页数:totalPage 算法一:totalPage = totalRecord % maxResult == 0 ? totalRecord / maxResult : totalRecord / maxRes 阅读全文
posted @ 2018-09-14 08:47 94cool 阅读(8665) 评论(0) 推荐(1) 编辑
摘要:string[] things= new string[] { "105", "101", "102", "103", "90","a","B" ,"A","b"}; foreach (var thing in things.OrderBy(x => x)) { Console.WriteLine( 阅读全文
posted @ 2018-07-15 20:08 94cool 阅读(4329) 评论(0) 推荐(0) 编辑
摘要:1、新建netcore或netstandard或net4.6.1项目 2、编辑项目文件: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>net4.6.1;net4.6.2;netstandard2.0;netc 阅读全文
posted @ 2018-07-10 19:17 94cool 阅读(3443) 评论(2) 推荐(0) 编辑
摘要:Visual Studio下运行PowerShell脚本自动更新项目里AssemblyInfo.cs文件的版本(自增小版本号)并发布到Nuget服务器上 附脚本【 update.ps1文件内容】: $path="Properties\AssemblyInfo.cs" $pattern = '\[as 阅读全文
posted @ 2018-06-28 12:32 94cool 阅读(584) 评论(0) 推荐(0) 编辑
摘要:利用Nuget打包添加tools下intsall.ps1【powershell脚本】修改.csproj文件, 以设置1、项目-生成-》输出-》选择【XML文件文件】 2、项目->调试-》启用调试器:取消[启用Visual Studio承载进程] install.ps1脚本如下: 阅读全文
posted @ 2018-06-23 23:18 94cool 阅读(571) 评论(0) 推荐(0) 编辑
摘要:static void Main() { string baseAddress = "http://localhost:4004/"; /*Render application Application.EnableVisualStyles(); Application.SetCompatibleTe 阅读全文
posted @ 2017-12-01 19:14 94cool 阅读(1012) 评论(1) 推荐(1) 编辑
摘要:from:https://www.xcode.me/more/net-csharp-generate-random 随机数生成方法可以说是任何编程语言必备的功能,它的重要性不言而言,在C#中我们通常使用Random类生成随机数,在一些场景下,我却发现Random生成的随机数并不可靠,在下面的例子中我 阅读全文
posted @ 2017-11-30 14:16 94cool 阅读(6887) 评论(1) 推荐(1) 编辑
摘要:在Package Manager Console中执行 A:新建数据库: 1、Add-Migration init[名称](为挂起的Model变化添加迁移脚本) 2、Update-Database(将挂起的迁移更新到数据库) ************************************* 阅读全文
posted @ 2016-08-17 09:39 94cool 阅读(263) 评论(0) 推荐(0) 编辑
摘要:.Net Core 控制台程序错误:Can not find runtime target for framework '.NETCoreApp,Version=v1.0' compatible with one of the target runtimes: 'win10-x64, win81-x 阅读全文
posted @ 2016-08-11 15:07 94cool 阅读(1933) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections.Generic;using System.Diagnostics;using System.IO;using System.Linq;using System.Net.Http;using System.Net.Http.H 阅读全文
posted @ 2016-08-08 08:47 94cool 阅读(3971) 评论(1) 推荐(1) 编辑
摘要:Net Core 控制台输出中文乱码的解决方法: } 阅读全文
posted @ 2016-08-08 08:26 94cool 阅读(3204) 评论(3) 推荐(3) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示