dotnetcore / dotnetcore/FreeSql
IndexAttribute 优化,提升代码实现可读性
Open
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 910
- PR merge metrics
- No merged PRs in 30d
Description
#### Feature 特性
```c#
namespace FreeSql.DataAnnotations;
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class IndexAttribute : Attribute
{
public string Fields { get; set; }
}
```
#### 简要描述原因
`Fields` 能否由string改为string[]
```c#
public string[] Fields { get; set; }
public IndexAttribute(string name, params string[] fields)
{
this.Name = name;
this.Fields = fields;
}
```
#### 使用场景
```c#
[Index("{tablename}_user_phone", "user_id", "phone`)]
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.