只有注册用户登录后才能阅读该文。 Read More
posted @ 2019-11-05 13:28
拎着红杯子的黄鸭子
Views(2)
Comments(0)
Diggs(0)
只有注册用户登录后才能阅读该文。 Read More
posted @ 2019-11-05 13:27
拎着红杯子的黄鸭子
Views(0)
Comments(0)
Diggs(0)
只有注册用户登录后才能阅读该文。 Read More
posted @ 2019-11-05 13:27
拎着红杯子的黄鸭子
Views(1)
Comments(0)
Diggs(0)
只有注册用户登录后才能阅读该文。 Read More
posted @ 2019-11-05 13:26
拎着红杯子的黄鸭子
Views(1)
Comments(0)
Diggs(0)
在DBContext的OnModelCreating()方法中调用上面的那个类 1.Infrastruture的Database文件夹建立Entityconfiguretions的文件夹 2.MyContext中实现DBContext的OnModelCreating()方法 3.添加迁移 4.更新数 Read More
posted @ 2019-11-05 13:26
拎着红杯子的黄鸭子
Views(68)
Comments(0)
Diggs(0)
Tag Helpers是服务器段的C#代码,在Razor文件里,参与到创建和渲染HTML元素的过程 和HTML Helpers类似 跟HTML的命名规范一致 内置了很多Tag Helpers也可以自定义 Javascript TAG HELPERS asp-src-include 把文件夹中所有的子 Read More
posted @ 2019-11-05 13:26
拎着红杯子的黄鸭子
Views(97)
Comments(0)
Diggs(0)
只有注册用户登录后才能阅读该文。 Read More
posted @ 2019-11-05 13:25
拎着红杯子的黄鸭子
Views(1)
Comments(0)
Diggs(0)
API不应该直接返回Entity,应该是返回一个Resource,不想把entity内部的细节暴漏给外部 viewModel是在MVC中的叫法 使用AutoMapper来对Entity和Resource映射 FentValidataion Read More
posted @ 2019-11-05 13:24
拎着红杯子的黄鸭子
Views(219)
Comments(0)
Diggs(0)
原本默认配置是 app.useHttpDeveloperExeptionPage();这样对MVC比较好 但是做api的话,不用页面用一个app.useExceptionHandler返回一个json的字符串好, 可以做一个useExceptionHandler的扩展方法,最后自定义返回的错误信息 Read More
posted @ 2019-11-05 13:24
拎着红杯子的黄鸭子
Views(87)
Comments(0)
Diggs(0)
1.定义类实现IResourceFilter 同步 异步 3.使用(IAction级别) controller级别 全局级别 4.效果 顺序 Read More
posted @ 2019-11-05 13:08
拎着红杯子的黄鸭子
Views(103)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号