从零开始学习 asp.net core 2.1 web api 后端api基础框架(七)-添加一个查询单笔数据的方法

再写一个查询单笔数据的方法: [Route("{id}")] public JsonResult GetProduct(int id) { return new JsonResult(ProductService.Current.Products.SingleOrDefault(x => x.Id == id));
相关文章
相关标签/搜索