I have seen several related questions here on stack overflow, however none appear to have answers. I will pose the question and then include links to related SO questions I have found.
I have a Core domain library written in C# that leverages Entity Framework. As such, EF requires the dbcontext to pass a connection string to the base (dbcontext). In my case the connection string lives in the app.config (or web.config) depends on top level project of course and the name is "AnnotatorModel".
I need to instantiate the DBContext from within my F# script to test a few queries and analytics.
I have added this to the app.config in my F# project and tried a few of the answers on SO with no success. Does anybody know a good easy straight forward way to accomplish this?
Here is the code, realize it breaks on attempting to instantiate the dbcontext, AnnotatorModel.
let PredictBestEntities (number:int) (tokens:string seq) =
let db = new AnnotatorModel()
tokens
|> Seq.map ...etc etc
Thanks, ~David
Related questions:
Get and use connection string from App.config F# AppSettings provider