Im using EntityFramework and EntityFramework.Migrations to implement solution using Code-First and Automatic Migrations.
Wherever i made a very simple test solution to test the Migrations capabilities and i`m stuck and renaming simple properties.
i have this entity :
public class Customer
{
public int Id { get; set; }
public string FullName { get; set; }
public string LastName { get; set; }
}
Now when i try to rename FullName to FirstName, I understand i have to use Update-Database with renames so i type this in the Console:
Update-Database -Renames:"Customer.FullName=>Customer.FirstName"
Now this used to work when i was using “SqlMigrations” but now that i Use “EntityFramework.Migrations” it doesn’t work, it gives me this error:
Update-Database : A parameter cannot be found that matches parameter name 'Renames'.
At line:1 char:26
+ Update-Database -Renames: <<<< "Customer.FullName=>Customer.FirstName"
+ CategoryInfo : InvalidArgument: (:) [Update-Database], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,System.Data.Entity.Migrations.UpdateDatabaseComma
nd
So i bet its different in EntityFramework.Migrations, Im not sure what im doing wrong or what i should be doing…
Here is Resources i have been reading about both:
The team of EntityFramework.Migration has confirmed that this features has been deprecated and its not in the last Beta-Build for
EntityFramework.Migrations