随笔分类 - 商城集成
摘要:1.模型建立,在模型上类上添加System.ComponentModel.DataAnnotations验证属性 ~~~C public class Product { public int Id { get; set; } [Required] public string Name { get;
阅读全文
摘要:ProductController.cs 可以根据用户类型分别显示商品价格,可以在类中修改 C \ region 商品价格 public virtual ActionResult GetDetailInfo(int id = 1, string viewName = "Detail") { YSWL
阅读全文
摘要:客户端在请求Web Api时可以有以下两种方式提供API key 基于Querystring提供Api key http://localhost:57967/Api/Values?key=12345 基于Request header体统API key 编写ApiKeyHandler 配置到特定的路由
阅读全文
只有注册用户登录后才能阅读该文。