日期:2014-05-20 浏览次数:21002 次
CREATE TABLE [dbo].[User] (
[ID] int IDENTITY(1,1) NOT NULL,
[Name] nvarchar(max) NOT NULL,
[Blog_ID] int NOT NULL
);
GO
-- Creating table 'Blog'
CREATE TABLE [dbo].[Blog] (
[ID] int IDENTITY(1,1) NOT NULL,
[Name] nvarchar(max) NOT NULL,
[UserId] int NOT NULL
);
GO
-- Creating table 'Post'
CREATE TABLE [dbo].[Post] (
[ID] int IDENTITY(1,1) NOT NULL,
[Title] nvarchar(max) NOT NULL,
[Content] nvarchar(max) NOT NULL,
[BlogId] int NOT NULL,
[Blog_ID] int NOT NULL
);
GO
-- Creating table 'Comment'
CREATE TABLE [dbo].[Comment] (
[ID] int IDENTITY(1,1) NOT NULL,
[Title] nvarchar(max) NOT NULL,
[Content] nvarchar(max) NOT NULL,
[PostId] int NOT NULL,
[Post_ID] int NOT NULL
);
GO
[ForeignKey("tid")]
public AdDisplayType DisplayType
{
get;
set;
}
public int tid { get; set; }