随笔分类 -  Net

摘要: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) 编辑
摘要:using System; using System.Collections.Generic; using System.IO; using System.Security.Cryptography; using System.Text; namespace ConsoleApp1 { intern 阅读全文
posted @ 2019-05-20 11:07 94cool 阅读(6606) 评论(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) 编辑
摘要:分页的总页数算法 设总记录数: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) 编辑
摘要:c# webapi 跳转 public HttpResponseMessage Post() { // ... do the job // now redirect HttpResponseMessage resp = new HttpResponseMessage(HttpStatusCode.M 阅读全文
posted @ 2018-07-12 17:56 94cool 阅读(3033) 评论(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) 编辑
摘要:/// <summary> /// 下载文件 /// </summary> public class DownloadController : ApiController { /// <summary> /// 下载文件 /// </summary> /// <returns></returns> 阅读全文
posted @ 2018-06-20 14:14 94cool 阅读(5604) 评论(0) 推荐(0) 编辑
摘要:// non debug mode from:https://social.msdn.microsoft.com/Forums/vstudio/en-US/221c9385-e2a8-4630-b2f5-f4eabfd62df5/programmatically-detect-whenever-te 阅读全文
posted @ 2018-06-19 15:24 94cool 阅读(158) 评论(0) 推荐(0) 编辑
摘要:public static bool IsPropertyExist(dynamic data, string propertyname) { if (data is ExpandoObject) return ((IDictionary<string, object>)data).Contains 阅读全文
posted @ 2017-12-28 14:36 94cool 阅读(10421) 评论(0) 推荐(2) 编辑
摘要:c# 使用MS SqlServer,连接成功,但是还报异常A connection was successfully established with the server, but then an error occurred during the login process. (provider 阅读全文
posted @ 2017-11-16 17:40 94cool 阅读(6270) 评论(0) 推荐(0) 编辑
摘要:class Operation { internal Tuple<int, int> FindMinMax(List<int> list) { int maximum = int.MinValue, minimum = int.MaxValue; list.ForEach(n => { minimu 阅读全文
posted @ 2017-10-10 14:40 94cool 阅读(346) 评论(0) 推荐(0) 编辑
摘要:public async Task<bool> CreateLogStore(string project, string logStore) { using (var client = new HttpClient()) { var time = DateTime.Now; string body 阅读全文
posted @ 2016-11-03 16:31 94cool 阅读(1678) 评论(0) 推荐(0) 编辑
摘要:from:http://www.cnblogs.com/mushroom/p/4659200.html 阅读目录: 介绍 为了防止网站意外暴增的流量比如活动、秒杀、攻击等,导致整个系统瘫痪,在前后端接口服务处进行流量限制是非常有必要的。本篇主要介绍下Net限流框架WebApiThrottle的使用。 阅读全文
posted @ 2016-10-17 13:56 94cool 阅读(955) 评论(0) 推荐(0) 编辑
摘要:在Package Manager Console中执行 A:新建数据库: 1、Add-Migration init[名称](为挂起的Model变化添加迁移脚本) 2、Update-Database(将挂起的迁移更新到数据库) ************************************* 阅读全文
posted @ 2016-08-17 09:39 94cool 阅读(263) 评论(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) 编辑
摘要:from:http://blog.csdn.net/ciaos/article/details/12618487 <?php $res1 = hash_hmac("sha1","signatureString", "secret"); echo $res1."\n"; //ee1b654aa861c 阅读全文
posted @ 2016-08-06 10:59 94cool 阅读(3472) 评论(0) 推荐(0) 编辑
摘要:Nuget自己打包引用的时候出现错误:Package is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package 1.0.1 supports: net (.NETFramework,Version=v0.0) 解 阅读全文
posted @ 2016-08-05 10:32 94cool 阅读(1499) 评论(0) 推荐(0) 编辑

< 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
点击右上角即可分享
微信分享提示