Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

Commit

Permalink
changed useraccount to use identity column for PK
Browse files Browse the repository at this point in the history
  • Loading branch information
brockallen committed Jan 10, 2013
1 parent 6b1fab0 commit eddb16a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
7 changes: 4 additions & 3 deletions BrockAllen.MembershipReboot/Models/UserAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ internal static UserAccount Create(string tenant, string username, string passwo
}

[Key]
[Column(Order=1)]
public int ID { get; set; }

[StringLength(50)]
[Required]
public virtual string Tenant { get; private set; }
[Key]
[Column(Order = 2)]
[StringLength(100)]
[Required]
public virtual string Username { get; private set; }
[EmailAddress]
[StringLength(100)]
Expand Down
11 changes: 3 additions & 8 deletions BrockAllen.MembershipReboot/Models/UserClaim.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,18 @@ public class UserClaim
{
[Key]
[Column(Order=1)]
[StringLength(50)]
public virtual string Tenant { get; set; }
public virtual int UserAccountID { get; set; }
[Key]
[Column(Order = 2)]
[StringLength(100)]
public virtual string Username { get; set; }
[Key]
[Column(Order = 3)]
[StringLength(150)]
public virtual string Type { get; set; }
[Key]
[Column(Order = 4)]
[Column(Order = 3)]
[StringLength(150)]
public virtual string Value { get; set; }

[Required]
[ForeignKey("Tenant, Username")]
[ForeignKey("UserAccountID")]
public virtual UserAccount User { get; set; }
}
}

0 comments on commit eddb16a

Please sign in to comment.