Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

数据库唯一键 [Column(Unique = “uk_xxxx")] #42

Closed
2881099 opened this issue Apr 26, 2019 · 2 comments
Closed

数据库唯一键 [Column(Unique = “uk_xxxx")] #42

2881099 opened this issue Apr 26, 2019 · 2 comments

Comments

@2881099
Copy link
Collaborator

2881099 commented Apr 26, 2019

class AddUniquesInfo {

    public Guid id { get; set; }
    [Column(Unique = "uk_phone")]
    public string phone { get; set; }

    [Column(Unique = "uk_group_index")]
    public string group { get; set; }
    [Column(Unique = "uk_group_index")]
    public int index { get; set; }

    [Column(Unique = "uk_group_index222")]
    public string index22 { get; set; }
}

Unique 指定相同的标识,代表联合唯一键;

2881099 pushed a commit that referenced this issue Apr 26, 2019
@2881099
Copy link
Collaborator Author

2881099 commented Apr 26, 2019

2881099 pushed a commit that referenced this issue Apr 26, 2019
@2881099
Copy link
Collaborator Author

2881099 commented May 1, 2020

方式已改,详细见文档

@2881099 2881099 closed this as completed May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant