摘要: 1. Run following command to install required packages: Install-Package Microsoft.EntityFrameworkCore.SqlServer 2. For database first approach, need to 阅读全文
posted @ 2017-07-21 16:04 liangzi4000 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Creating a Custom Controller Factory Create a custom controller factory by implementing IControllerFacotry interface and register it in Application_St 阅读全文
posted @ 2017-06-13 15:28 liangzi4000 阅读(315) 评论(0) 推荐(0) 编辑
摘要: Filters are .NET attributes that add extra steps to the request processing pipeline. The MVC Framework supports five different types of filters. Each 阅读全文
posted @ 2017-06-12 16:55 liangzi4000 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 1. Transaction In all versions of Entity Framework, whenever you execute SaveChanges() to insert, update or delete on the database the framework will 阅读全文
posted @ 2017-06-02 15:27 liangzi4000 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Creating a Controller with IController All controller classes must implemet IController interface. Creating a Controller by Deriving from the Controll 阅读全文
posted @ 2017-05-13 11:36 liangzi4000 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Convention-based Routing Creating and Registering a Simple Route App_Start/RouteConfig.cs Global.asax.cs Using Static URL Segments Defining Variable-L 阅读全文
posted @ 2017-05-10 22:40 liangzi4000 阅读(204) 评论(0) 推荐(0) 编辑
摘要: Explicitly Validating a Model Displaying Validation Errors to the User The helpers add a CSS class called "input-validation-error" to the input elemen 阅读全文
posted @ 2017-05-03 10:31 liangzi4000 阅读(253) 评论(0) 推荐(0) 编辑
摘要: Default Model Binder The Order in Which the DefaultModelBinder Class Looks for Parameter Data: Bind to simple type: The DefaultModelBinder tries to co 阅读全文
posted @ 2017-05-02 11:57 liangzi4000 阅读(230) 评论(0) 推荐(0) 编辑
摘要: C# version 1.0 delegate C# version 2.0 introduced anonymous method, creating anonymous methods is essentially a way to pass a code block as a delegate 阅读全文
posted @ 2017-04-29 16:30 liangzi4000 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Event declaration and implementation: Usage: .NET framework has provided EventHandler delegate and EventArgs class, they are replace the OnRequestRais 阅读全文
posted @ 2017-04-29 16:09 liangzi4000 阅读(138) 评论(0) 推荐(0) 编辑