Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class Users
- {
- [Column("UserId")]
- public int Id { get; set; }
- public string UserName { get; set; }
- public string Email { get; set; }
- public string Password { get; set; }
- public byte SubscriptionLevelId { get; set; }
- public SubscriptionLevels SubscriptionLevels { get; set; }
- public ICollection<Competitions> Competitions { get; set; }
- public ICollection<Participants> Participants { get; set; }
- public ICollection<ResultStats> ResultStats { get; set; }
- }
- public partial class SubscriptionLevels
- {
- [Column("SubscriptionLevelId")]
- public byte Id { get; set; }
- public string SubscriptionLevelName { get; set; }
- }
- CREATE TABLE [dbo].[Users](
- [UserId] [int] IDENTITY(1,1) NOT NULL,
- [Email] [nvarchar](max) NULL,
- [Password] [nvarchar](max) NULL,
- [SubscriptionLevelId] [tinyint] NOT NULL,
- [SubscriptionLevelsId] [tinyint] NULL,
- [UserName] [nvarchar](max) NULL,
- CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED
- (
- [UserId] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- ALTER TABLE [dbo].[Users] WITH CHECK ADD CONSTRAINT [FK_Users_SubscriptionLevels_SubscriptionLevelsId] FOREIGN KEY([SubscriptionLevelsId])
- REFERENCES [dbo].[SubscriptionLevels] ([SubscriptionLevelId])
- GO
- ALTER TABLE [dbo].[Users] CHECK CONSTRAINT [FK_Users_SubscriptionLevels_SubscriptionLevelsId]
- GO
Add Comment
Please, Sign In to add comment