Resource Model

API不应该直接返回Entity,应该是返回一个Resource,不想把entity内部的细节暴漏给外部

 

 viewModel是在MVC中的叫法

使用AutoMapper来对Entity和Resource映射

 

 FentValidataion

 

posted @ 2019-11-05 13:24  拎着红杯子的黄鸭子  Views(200)  Comments(0Edit  收藏  举报