The question is quite simple: Is it possible to use Entity Framework 7
(beta4) with ASP.NET 4.6
(Web Api in my case)?
For the moment I cannot make it work, the following exception is always raised:
An exception of type
System.InvalidCastException
occured in Microsoft.Framework.DependencyInjection.Interfaces.dll but was not handled in user code.Additional information: Unable to cast object of type Microsoft.Framework.Logging.LoggerFactory to type Microsoft.Framework.Logging.ILoggerFactory.
This error is quite strange since I do not use any logging functionnality of EF 7. It has maybe something with registration to do? I read that with ASP.NET 5, you have to register EF like this: services.AddEntityFramework()
, which I'm currently not doing since I'm using Version 4.6...
project.json
... – Bidou Jul 13 '15 at 16:52packages.config
and<runtime>
section of yourWeb.config
look like? – bricelam Jul 13 '15 at 22:33