Is there a way to insert data using LinqPad and the entity framework?
You need a "Context" of some kind to do an Add or AddObject. I can't find how to get that reference.
I tried making one but then I go this error:
ArgumentException: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
Any one know a cool way to insert/update in LinqPad with Entity Framework?
In order to use Entity Framework from LINQPad, you would need an existing data context since LINQPad can only generate LINQ-to-SQL data contexts (if you don't already have a project with such a data context, create one and build it)
What I was missing was the connection string.
I had to copy the connection string from my App.config file (replacing the "
with '
) and put it in the constructor of my ObjectContext.
After I did that it all worked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With