摘要:
原文:http://www.asp.net/web-api/overview/error-handling/exception-handling This article describes error and exception handling in ASP.NET Web API. HttpR 阅读全文
摘要:
public class validationActionFilter:ActionFilterAttribute { public override void OnActionExecuting(System.Web.Http.Controllers.HttpActionContext actionContext) { var m... 阅读全文
摘要:
https://blog.oneunicorn.com/2012/02/27/code-first-migrations-making-__migrationhistory-not-a-system-table/ Code First Migrations uses a table called _ 阅读全文
摘要:
C# 6.0可能的新特性 1、主构造函数(Primary Constructors) 主构造函数给类中的变量赋值 Before public class Point { private int x, y; public Point(int x, int y) this.x = x; this.y = 阅读全文
摘要:
public static Guid GenerateGuid() { byte[] guidArray = Guid.NewGuid().ToByteArray(); var baseDate = new DateTime(1900, 1, 1); DateTime now = DateTime.Now; var days = new TimeSpan(now... 阅读全文
摘要:
Snippet Designer is a Visual Studio plug in which allows you to create and search for snippets inside the IDE https://visualstudiogallery.msdn.microso 阅读全文
摘要:
1.创建 API 帮助页 2.将帮助页添加到现有的项目 3.添加Api文档 4.Under the Hood 当你创建一个网络 API 时,它很有用来创建一个帮助页,以便其他开发人员将知道如何调用您的 API。您可以创建的所有文档手动,但它是自动生成尽可能多地更好。 为了简化这一任务,ASP.NET Web API 提供一个库自动生成帮助页在运行时。 回到顶部 1.创建 API 帮助页 安装A... 阅读全文
摘要:
using CanDoo.Contracts; using CanDoo.Core.Data; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using CanDoo.Data; using System.Linq... 阅读全文