Skip to content

Commit afd7844

Browse files
rphiRick-Anderson
authored andcommitted
Update entity-framework-6.rst (dotnet#1687)
Hi, I couldn't get this demo to work unless I added this underscore (source http://bleedingnedge.com/2015/11/01/entity-framework-6-with-asp-net-5/) otherwise I got the error "Cannot convert lambda expression to type 'Type' because it is not a delegate type" I'm not sure whether this is supposed to happen? Cheers, Rob
1 parent 96adf7b commit afd7844

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aspnet/data/entity-framework-6.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ In the ``Startup`` class within ``ConfigureServices`` add factory method of your
4646
4747
public void ConfigureServices(IServiceCollection services)
4848
{
49-
services.AddScoped(() => new ApplicationDbContext(Configuration["Data:DefaultConnection:ConnectionString"]));
49+
services.AddScoped((_) => new ApplicationDbContext(Configuration["Data:DefaultConnection:ConnectionString"]));
5050
5151
// Configure remaining services
5252
}

0 commit comments

Comments
 (0)