上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 18 下一页
摘要: --插入不可为空INT类型,并赋默认值 ALTER TABLE [dbo].[Y.UserInfo] ADD UserId INT NOT NULL Default 0; --插入可为空INT类型 ALTER TABLE [dbo].[Y.UserInfo] ADD IsEmail INT NULL 阅读全文
posted @ 2022-01-11 17:20 PrintY 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 开发环境(development):开发环境是程序猿们专门用于开发的服务器,配置可以比较随意, 为了开发调试方便,一般打开全部错误报告。(程序员接到需求后,开始写代码,开发,运行程序,看看程序有没有达到预期的功能;) 测试环境(testing):一般是克隆一份生产环境的配置,一个程序在测试环境工作不 阅读全文
posted @ 2021-12-13 17:22 PrintY 阅读(284) 评论(0) 推荐(0) 编辑
摘要: Program.cs var corsPolicyName = "_myAllowSpecificOrigins"; builder.Services.AddCors(options => { options.AddPolicy(name: corsPolicyName, builder => { 阅读全文
posted @ 2021-12-09 14:23 PrintY 阅读(1866) 评论(0) 推荐(0) 编辑
摘要: C#中语法,model中属性默认都是大驼峰,但是.NET6 WebAPI默认出传到前台自动转化成小驼峰写法,如果要避免这个问题,处理也比较简单~ Program.cs builder.Services.AddControllers() .AddJsonOptions(options => { opt 阅读全文
posted @ 2021-12-09 14:21 PrintY 阅读(873) 评论(1) 推荐(0) 编辑
摘要: Program.cs文件中 //获取IP使用 builder.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>(); Controller中 private readonly IHttpContextAccessor h 阅读全文
posted @ 2021-12-09 14:15 PrintY 阅读(719) 评论(0) 推荐(0) 编辑
摘要: 1、安装依赖 Microsoft.Extensions.Logging.Log4Net.AspNetCore 2、配置文件 <?xml version="1.0" encoding="utf-8" ?> <configuration> <!-- This section contains the l 阅读全文
posted @ 2021-12-09 14:11 PrintY 阅读(737) 评论(0) 推荐(0) 编辑
摘要: 1、上代码 /// <summary> /// API白名单过滤器 /// </summary> public class APIFilter : ActionFilterAttribute { /// <summary> /// 控制器中加了该属性的方法中代码执行之前该方法。 /// 所以可以用做 阅读全文
posted @ 2021-12-09 14:03 PrintY 阅读(784) 评论(0) 推荐(0) 编辑
摘要: 1、下载.net6 运行时以及host支持 https://dotnet.microsoft.com/download/dotnet/6.0 2、IIS 没说什么特别的,绑定域名端口,然后设置IIS应用程序池到“无托管” 阅读全文
posted @ 2021-12-08 15:23 PrintY 阅读(3610) 评论(0) 推荐(0) 编辑
摘要: 1. API功能 功能: 根据商品名查询商品信息 2. 创建商品实体 AbpTraining.Core\Products\Product.cs using Abp.Domain.Entities.Auditing; using System.ComponentModel.DataAnnotation 阅读全文
posted @ 2021-09-23 09:59 PrintY 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 解决方案: 一、工具-->Nuget程序包管理器-->程序包管理器设置 二、 Nuget Package Manager-->程序包源 三、点击右上角的 加号按钮 ,添加一个新的Nuget源选项 四、名称:随便取 源:https://api.nuget.org/v3/index.json 五、点击右 阅读全文
posted @ 2021-09-23 09:39 PrintY 阅读(981) 评论(0) 推荐(2) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 18 下一页