mirror of
https://github.com/dotnetcore/FreeSql.git
synced 2026-02-15 21:00:54 +08:00
update
4
实体特性.md
4
实体特性.md
@@ -69,7 +69,9 @@ class Topic {
|
||||
}
|
||||
```
|
||||
|
||||
说明:由于内部按名称反射查找特性的,所以 MaxLengthAttribute 可以在任意地方定义。该特性通常定义在 System.ComponentModel.DataAnnotations.MaxLengthAttribute,但如果找不到该类,可自行在项目中定义名称为 MaxLengthAttribute 的特性类,以及它的属性 Length,如下:
|
||||
说明:由于内部按名称反射查找特性的,所以 MaxLengthAttribute 可以在任意地方定义。
|
||||
该特性通常定义在 System.ComponentModel.DataAnnotations.MaxLengthAttribute。
|
||||
如果找不到该类,可自行在项目中定义名称为 MaxLengthAttribute 的特性类,如下:
|
||||
|
||||
public class MaxLengthAttribute : Attribute
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user