随笔分类 -  net

net
摘要:1.进入宝塔ssh 2.安装dotnetcore sdk sudo yum install dotnet-sdk-6.0 3.上传文件 4.新建一个网站,网址www.localhost8892.com:8892 5.设置反向代理,填写目标URL:http://localhost:5000,还有名称其 阅读全文
posted @ 2022-12-27 16:32 星落森河 阅读(54) 评论(0) 推荐(0)
摘要:if (!ModelState.IsValid) { foreach (var key in ModelState.Keys) { var ModelStateKey = ModelState[key]; if (ModelStateKey.Errors.Any()) { var ModelStat 阅读全文
posted @ 2022-06-14 15:12 星落森河 阅读(314) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using 阅读全文
posted @ 2022-06-10 17:23 星落森河 阅读(191) 评论(0) 推荐(0)
摘要:依赖: 命令行: Scaffold-DbContext 'Data Source=IP地址;Initial Catalog=数据库名称;uid=账号;pwd=密码' Microsoft.EntityFrameworkCore.SqlServer -ContextDir Data -OutputDir 阅读全文
posted @ 2022-06-09 15:54 星落森河 阅读(85) 评论(0) 推荐(0)
摘要:工具:Visual Studio 2022 平台:.NET6 Webapi + Entity Framwork Core 代码:点我 1.Model 2.DAL/DAO 3.BLL/Service 4.Controller 理解流程: 请求进入Controller(UI层),Controller去调 阅读全文
posted @ 2022-04-20 09:00 星落森河 阅读(73) 评论(0) 推荐(0)