![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
.Net
Kevin M
这个作者很懒,什么都没留下…
展开
-
WTM框架EFCore数据迁移
WTM开发框架初始化原创 2022-10-05 01:28:12 · 849 阅读 · 0 评论 -
上传图片(文件流)
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Web;using System.Drawing;using System.Drawing.Imagin...原创 2019-10-21 12:00:19 · 1764 阅读 · 0 评论 -
配置Swagger
1.添加Nuget包(Swashbuckle.Core 和 Swagger.Net.UI)–> 联机先后搜 Swashbuckle 与Swagger 关键字2.安装好之后回在项目的根目录下生成一个SwaggerUI的文件夹 ,里面是一些css样式和js文件,在 App_Start文件夹下 会添加两个文件 SwaggerConfig.cs 和SwaggerNet.cs 主要的配置在这里...原创 2019-12-29 19:00:13 · 188 阅读 · 0 评论 -
WebApi跨域问题
1.在webapi项目上面使用Nuget搜索“microsoft.aspnet.webapi.cors,安装。2.在App_Start文件夹下面的WebApiConfig.cs文件夹配置跨域config.EnableCors(new EnableCorsAttribute("*","*","*"));详见:https://www.jianshu.com/p/e651ff50dc80...原创 2019-12-30 11:52:49 · 147 阅读 · 0 评论 -
MVC依赖注入
1.创建三个类库IUserInfoService.cs public interface IUserInfoService { List<UserInfo> GetUserInfo(); }UserInfoService.cs public class UserInfoService: IUserInfoService { ...原创 2020-03-24 00:19:59 · 405 阅读 · 0 评论 -
log4net日志
[assembly: log4net.Config.XmlConfigurator(Watch = true)]private static readonly ILog log = LogManager.GetLogger(typeof(HomeController));<configSections> <section name="log4net" typ...原创 2020-04-21 21:13:01 · 106 阅读 · 0 评论 -
Json Web Token加密解密
Json Web Token加密解密using System;using System.Collections.Generic;using System.Linq;using System.Security.Cryptography;using System.Text;using System.Threading.Tasks;using Newtonsoft.Json;using Newtonsoft.Json.Linq;namespace SquirrelCommon{ pu原创 2020-07-09 09:25:01 · 980 阅读 · 0 评论 -
根据城市名称获取天气信息
[Route("api/Weather/weather")] [HttpGet] public Reponse<WeatherRes> weather(string city) { var JsonStr = Get("http://wthrcdn.etouch.cn/weather_mini?city=" + city); var result = JsonConvert.DeserializeO.原创 2020-10-12 10:53:30 · 430 阅读 · 0 评论 -
.NET MVC获取微信jssdk
前端var href = window.location.href.split('#')[0]; href = encodeURIComponent(href) href = encodeURIComponent(href)//这个url一定要转码两次 后端解码一次 (杜绝中文参数时获取签名报错) function GetJsApiInfo() { $.ajax({原创 2020-12-03 16:17:27 · 177 阅读 · 0 评论