因为官网asp.net core webapi教程部分,给出的是使用内存中的数据即 UseInMemoryDatabase 的方式, 这里记录一下,使用SQL Server数据库的方式即 UseSqlServer 的方式. 环境说明: 这里使用的是win 7 下的 virtual studio 2017 ,数据库使用的Sql Server 1.创建一个web项目 文件->新建->项目 选择 ASP.NET Core Web 应用 的模板,项目名 WebApiDemo 在新的 ASP.NET C
介绍 作为一个开发人员,你知道如何分析自己开发的Api性能么? 在Visual Studio和Azure中, 我们可以使用Application Insight来监控项目.除此之外我们还可以使用一个免费工具Stackify Prefix,它允许追踪所有的Http请求, 这里有一篇博客讲解了如何使用Stackify Prefix(Scalable and Performant ASP.NET Core Web APIs: Profiling and Monitoring). 本文我将引入另外一个工
一.Core WebAPI中的序列化 使用的是Newtonsoft.Json,自定义全局配置处理: // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { //使用IMvcBuilder 配置Json序列化处理 services.AddMvc()