随笔分类 -  .net

摘要:代码: 1 using Autofac; 2 using Autofac.Extensions.DependencyInjection; 3 using Microsoft.EntityFrameworkCore; 4 using Microsoft.Extensions.Configuration 阅读全文
posted @ 2020-07-31 16:39 lishidefengchen
摘要:@echo off set myDir=D:\alm set myBuildDir=D:\Source\Core\DD.Webapi pushd %myBuildDir% ::switch build directory git pull if %errorlevel%==0 (dotnet pub 阅读全文
posted @ 2020-07-15 09:14 lishidefengchen
摘要:cmd到入口项目目录下,然后再执行该命令,才是真正的发布; 阅读全文
posted @ 2020-07-13 17:42 lishidefengchen
摘要:使用这个命令,需要把cmd指定在程序入口项目目录下,然后再执行即可。 阅读全文
posted @ 2020-07-13 17:38 lishidefengchen
摘要:int.TryParse(dto.OrderTimeout.ToString(), out int num); 等价于 int int; int.TryParse(dto.OrderTimeout.ToString(), out num); 阅读全文
posted @ 2020-07-13 17:22 lishidefengchen
摘要:/// <summary> /// 私有辅助方法 /// </summary> /// <param name="db"></param> /// <param name="entity"></param> private void UpdateHelper(T db, T entity) { fo 阅读全文
posted @ 2020-07-13 10:27 lishidefengchen
摘要:/// <summary> /// 分页2 /// </summary> /// <param name="current"></param> /// <param name="pageSize"></param> /// <param name="total"></param> /// <para 阅读全文
posted @ 2020-07-07 12:12 lishidefengchen
摘要:docker环境: 启动容器时,添加参数:-e " ASPNETCORE_ENVIRONMENT=Development" windows系统: 命令行,以管理员身份运行:setx ASPNETCORE_ENVIRONMENT "Development" *inux系统: 终端中,执行:export 阅读全文
posted @ 2020-07-01 19:14 lishidefengchen
摘要:【现象】:EJF调用PLM的接口,短时间内出现大量下单请求,导致网络阻塞,数据库连接池达到上限,接口崩溃; 【环境】:服务器使用的是阿里云,centos7 + docker + redis + netcore,网络带宽5M,数据库最大连接数设置了3000; 【分析】:接口出现崩溃现象后—— 1、检查 阅读全文
posted @ 2019-10-25 16:02 lishidefengchen
摘要:1 fail: Microsoft.AspNetCore.Server.Kestrel[13] 2 Connection id "0HLPN4417RVEM", Request id "0HLPN4417RVEM:00000001": An unhandled exception was thrown by the application. 3 MySql.Data.MySql... 阅读全文
posted @ 2019-09-12 10:30 lishidefengchen
摘要:(完) 阅读全文
posted @ 2019-09-06 11:42 lishidefengchen
摘要:对于开发环境,如果你需要使用.netcore命令的话,你需要安装SDK;如果你还需要运行.netcore的网站的话,你必须还要安装它的【runtime】和【hosting server】; 对于服务器,就不必安装SDK了,直接安装【runtime】和【hosting server】就可以了; 阅读全文
posted @ 2019-08-30 13:08 lishidefengchen
摘要:网站启动后,报错 HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure 请检查安装的.netcore runtime版本和hosting版本是否跟程序的要求的匹配: 请直接点击上图中所示的捆绑安装包,进行安装,这安装可以一次性安装.net co 阅读全文
posted @ 2019-08-30 12:32 lishidefengchen
摘要:protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "ResponsiblePerson", table: "AppYWProducts", ... 阅读全文
posted @ 2019-08-02 14:17 lishidefengchen
摘要:发布Release版本:dotnet publish --configuration Release 发布Debug版本:dotnet publish --configuration Debug 阅读全文
posted @ 2019-04-15 12:57 lishidefengchen
摘要:视图: 1 @model RegisterViewModel 2 @{ 3 ViewData["Title"] = "Register"; 4 } 5 6 <h2>@ViewData["Title"]</h2> 7 8 <div class="row"> 9 <div class="col-md-4 阅读全文
posted @ 2017-12-30 18:37 lishidefengchen
摘要:有一组数1、1、2、3、5、8、13、21、34...,求第n个数是多少? 阅读全文
posted @ 2017-12-27 09:21 lishidefengchen
摘要:以下代码用来检查,客户端是手机端还是PC端 阅读全文
posted @ 2017-12-19 11:23 lishidefengchen
摘要:EntityFrameworkCore项目--Nuget包管理,卸载包: Microsoft.EntityFrameworkCore.SqlServer; EntityFrameworkCore项目和Host项目--Nuget包管理,添加包: Pomelo.EntityFrameworkCore.M 阅读全文
posted @ 2017-11-14 16:00 lishidefengchen
摘要:ListItem item = new ListItem("--请选择--",""); ddlstPurchaser.Items.Insert(0, item); ddlstPurchaser2.Items.Insert(0, item); 上面这样写就会报错:DropDownList 不能绑定多个 阅读全文
posted @ 2017-05-04 16:01 lishidefengchen