Tag: asp.net core 1.0

找不到可执行的匹配命令“dotnet-ef”

我正在使用ASP.Net Core RC2与Microsoft.EntityFramework.Core和SQLite做项目示例。 我按照这个教程: https : //damienbod.com/2015/08/30/asp-net-5-with-sqlite-and-entity-framework-7/ 但是,当我运行这个命令: dotnet ef migrations add FirstMigration 我得到这个错误: No executable found matching command "dotnet-ef" 这是我的project.jsonconfiguration: { "dependencies": { "Microsoft.NETCore.App": { "version": "1.0.0-rc2-3002702", "type": "platform" }, "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final", "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final", "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final", "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final", "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final", "Microsoft.Extensions.Logging": "1.0.0-rc2-final", "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final", "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final", "Microsoft.EntityFrameworkCore": "1.0.0-rc2-final", "Microsoft.EntityFrameworkCore.Sqlite": "1.0.0-rc2-final" }, "tools": […]

如何获取当前login的用户标识ASP.NET Core

我已经使用User.Identity.GetUserId()使用MVC5做了这个,但是这似乎不工作在这里。 User.Identity没有GetUserId()方法 我正在使用Microsoft.AspNet.Identity