Movies included in database as well and handled in site
This commit is contained in:
29
Vidly/Migrations/201901201316381_AddDatesToMovie.cs
Normal file
29
Vidly/Migrations/201901201316381_AddDatesToMovie.cs
Normal file
@ -0,0 +1,29 @@
|
||||
namespace Vidly.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class AddDatesToMovie : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateTable(
|
||||
"dbo.Movies",
|
||||
c => new
|
||||
{
|
||||
Id = c.Int(nullable: false, identity: true),
|
||||
Name = c.String(),
|
||||
ReleaseDate = c.DateTime(nullable: false),
|
||||
DateAdded = c.DateTime(nullable: false),
|
||||
NumberInStock = c.Int(nullable: false),
|
||||
})
|
||||
.PrimaryKey(t => t.Id);
|
||||
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropTable("dbo.Movies");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user