KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using Entity Framework 4.3 Code First and trying out the Migrations feature. If I add a new property to my class and then run Add-Migration from the package manager console window I get something like this: public override void Up() { AddColumn("Products", "Discontinued", c => c.Boolean(nullable: false)); } I would like to be able to affect the order of the column as I don't want it to just be appended to the table but rather placed at a specific index. I thought I might be able to add it to my modelBuilder configuration, something like: Property(p => p.Discontinued).HasColumnOrder(2); but running Update-database does not appear to use it. Can this be done as a migration?
Tags (comma-separated)
Save Edits
Cancel