Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Table("Product")]
- public class Product : EntityBase
- {
- [Key]
- public int Id { get; set; }
- public virtual ICollection<Argument> Arguments { get; set; }
- public virtual ICollection<Product> AdditionalProducts { get; set; }
- }
- public partial class test1 : DbMigration
- {
- public override void Up()
- {
- AddColumn("dbo.Product", "Product_Id", c => c.Int());
- CreateIndex("dbo.Product", "Product_Id");
- AddForeignKey("dbo.Product", "Product_Id", "dbo.Product", "Id");
- }
- public override void Down()
- {
- DropForeignKey("dbo.Product", "Product_Id", "dbo.Product");
- DropIndex("dbo.Product", new[] { "Product_Id" });
- DropColumn("dbo.Product", "Product_Id");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement