流浪のwolf

卷帝

导航

2023年10月12日

C# Webapi 简单的依赖注入-构造函数

摘要: 控制器部分: using Microsoft.AspNetCore.Mvc; using WebApplication1.IServices; using WebApplication1.Utility.SwaggerExt; namespace WebApplication1.Controller 阅读全文

posted @ 2023-10-12 19:23 流浪のwolf 阅读(38) 评论(0) 推荐(0) 编辑

C# webapi 跨域

摘要: #region 启用跨域访问 app.UseCors(builder => builder .AllowAnyMethod() .SetIsOriginAllowed(_ => true) .AllowAnyHeader() .AllowCredentials() ); #endregion app 阅读全文

posted @ 2023-10-12 09:19 流浪のwolf 阅读(81) 评论(0) 推荐(0) 编辑