c# - Create migration files for LocalDB -


i new asp.net core 1.0 , know pretty new.

i have problems applying migrations. following tutorial whole process written rc1. using rc2 , same tutorial doesn't work.

i have updated dependencies code may see bellow, read lot of blog posts , videos on how go further, still don't understand next.

i have following code far:

public void configureservices(iservicecollection services) {     services.addmvc();     services.adddbcontext<odetofooddbcontext>(options => options.usesqlserver(configuration["database:connection"]));     services.addsingleton(p => configuration);     services.addsingleton<igreeter, greeter>();     services.addscoped<irestaurantdata, sqlrestaurantdata>(); }  public class odetofooddbcontext : dbcontext {     public dbset<restaurant> restaurants { get; set; } } 

and following dependencies:

"microsoft.entityframeworkcore.inmemory": "1.0.0-rc2-final",     "microsoft.entityframeworkcore": "1.0.0-rc2-final",     "microsoft.entityframeworkcore.tools": "1.0.0-preview1-final",     "microsoft.entityframeworkcore.sqlserver": "1.0.0-rc2-final",     "microsoft.aspnetcore.server.iisintegration": "1.0.0-rc2-final",     "microsoft.aspnetcore.server.kestrel": "1.0.0-rc2-final",     "microsoft.framework.configuration": "1.0.0-beta8",     "microsoft.framework.configurationmodel.json": "1.0.0-beta4",     "microsoft.extensions.configuration.json": "1.0.0-rc2-final",     "microsoft.extensions.platformabstractions": "1.0.0-rc2-final",     "microsoft.aspnet.staticfiles": "1.0.0-beta8",     "microsoft.aspnetcore.diagnostics": "1.0.0-rc2-final",     "microsoft.aspnetcore.staticfiles": "1.0.0-rc2-final",     "microsoft.aspnetcore.mvc.core": "1.0.0-rc2-final",     "microsoft.aspnetcore.mvc": "1.0.0-rc2-final",     "microsoft.aspnetcore.identity.entityframeworkcore": "1.0.0-rc2-final",     "microsoft.aspnetcore.routing": "1.0.0-rc2-final", 

the problems when in command , run dotnet ef returns following message: "executable found matching command "dotnet-ef".

if use dnx instead, think should not work still tried, return "unknown keyword platform".

when checking if local db exists sqllocaldb info mssqllocaldb command, returns information exists.

so question how go further apply migration project?

had problem well...

the dnvm, dnu, dnx toolchain replaced dotnet when rc2 replaced rc1. uninstall asp.net core features , make sure ones have following:

.net core rc2

install required frameworks from: https://www.microsoft.com/net/core#windows

when have done this, ensure targeting correct frameworks in project.json. dnxcore50 can targeted deprecated, use netcoreapp1.0 instead not dnx451 can target net451 if need make use of full framework.

when run dotnet ef command, running folder project.json located? if not, should.