首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > sluggable-for-castle

sluggable-for-castle

  • 资源大小:5.20 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签:

资 源 简 介

1- Derive a partial class from ActiveRecordBase , ActiveRecordValidationBase . 2- Derive all model classes from that class. 3- Place the Sluggable.cs file with your models. 4- In the Sluggable.cs file, change the class name MyActiveRecord to match the class from step 1 and the namespace to match the models. 5- In the models you want sluggable, add the Sluggable Attribute: [Sluggable("ProposalProperty", "SlugProperty", "ScopeProperty", "Separator")] for example: [Sluggable("Title", "Identifier", "Author", "-")] This means a slug will be generated from Title and placed in Identifier. The slug will be unique in the scope of ScopeProperty. It will replace all foreign characters and all characters not in a to z, 0 to 9 by separator and change to lower case. Duplicates will be appended a number

文 件 列 表

Sluggable.cs
Readme.txt
VIP VIP
0.168810s