Upgrading your ASP.NET 5 project from Beta 7 to Beta 8
Microsoft just released ASP.NET 5 and Entity Framework Beta 8. There were some breaking changes which require some changes in existing code.
All changes can be found here: Announcing Availability of ASP.NET 5 Beta8
As with every upgrade you should change the -beta7 to -beta8 in the global.json and in all package.json files.
Below I address the things I found which need to be corrected:
Package.json
Remove these dependencies:
- "Microsoft.AspNet.Server.IIS": "1.0.0-beta7"
- "Microsoft.AspNet.Server.WebListener": "1.0.0-beta7"
- "Microsoft.AspNet.IISPlatformHandler": "1.0.0-beta8"
- "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8"
- "Microsoft.Framework.Logging.Debug" : "1.0.0-beta8"
- "web": "Microsoft.AspNet.Hosting --config hosting.ini"
- "web": "Microsoft.AspNet.Server.Kestrel"
Controllers
The property Context was renamed to HttpContext.
web.config
Remove this part: and add this instead:
Startup.cs
And in method Configure
Mocking DbSet
If you're mocking DbSet's AddRange method, you have to specify the optional parameter, since one was added in EF Beta8:
That were all problems I had in my code.
Comments
Post a Comment