LINQPad lets you query Entity Framework models that you define in Visual Studio. In a nutshell, here's how to proceed:

  1. Create an ADO.NET Entity Data Model in a Visual Studio project, and build.
  2. From LINQPad, click Add Connection (top left)
  3. Set the Data Context dropdown to Custom Entity Framework ObjectContext:
    (转)Using LINQPad with Entity Framework
  4. Click Browse and locate the assembly (DLL or EXE) that you built in step 1:
    (转)Using LINQPad with Entity Framework
  5. Choose your typed ObjectContext class and Entity Data Model: (转)Using LINQPad with Entity Framework
  6. Confirm the SQL Server and database details and click OK.
  7. Your Conceptual Model will now show in the Schema Explorer. Right-click to start a new query:
    (转)Using LINQPad with Entity Framework

A few notes:

  • You can return to Visual Studio at any time and rebuild - LINQPad will not lock your assembly.
  • LINQPad automatically refreshes the schema explorer and autocompletion cache whenever the assembly changes.
  • If your assembly references other assemblies, LINQPad will pick up these, too, providing they live in the same folder.

http://www.linqpad.net/EntityFramework.aspx

 

相关文章:

  • 2021-09-17
  • 2022-01-19
  • 2021-12-23
  • 2021-05-27
猜你喜欢
  • 2021-12-15
  • 2021-11-23
  • 2021-09-16
  • 2021-11-06
  • 2021-06-28
  • 2022-12-23
  • 2022-01-10
相关资源
相似解决方案