Closed jaduff closed 7 years ago
Hmm, seems to be magical? https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/dependency-injection
An unhandled exception has occurred: Unable to resolve service for type 'LabLog.EventModelContext' while attempting to activate 'LabLog.Controllers.AdminController'. System.InvalidOperationException: Unable to resolve service for type 'LabLog.EventModelContext' while attempting to activate 'LabLog.Controllers.AdminController'.
It's not magic, you register the dependencies in ConfigureServices in startup.cs. See here for an example: https://github.com/simonjduff/DdhpCore/blob/master/src/DdhpCore.FrontEnd/Startup.cs
Microsoft.Data.Sqlite.SqliteException: SQLite Error 19: 'UNIQUE con straint failed: LabEvents.Version'.
I can't see how/where the version is set.
Check VersionTests.cs to see how version works
Have all the issues been sorted? Should I merge this now?
I've added a constructor to the controller to accept EventModelContext, but don't know how/where to inject from?