Skip to content
Ryan Ephgrave edited this page May 13, 2022 · 2 revisions

Welcome to the EFPosh wiki!

What is Entity Framework Posh

Entity Framework is a .Net ORM built by Microsoft which allows users to easily interact with databases. You tell Entity Framework what the Database looks like (the DbContext) and Entity Framework will then be able to create the Database, edit the database, and query the database! EFPosh brings these features to PowerShell!

How To Use This Module

When building this module, my expectation was users would build a reusable DbContext, store it in a .ps1 file, and then use that whenever they needed to query the database. Start-EFPoshModel creates a good base for what I thought the easiest way to use this module was. It creates a .ps1 file that can then be called in any script with:

 $DbContext = . .\EFposhModel.ps1 -MSSqlServer 'Server' -Database 'DbName'

Building the DbContext

The most important part of EFPosh is the DbContext. It should be an accurate reflection of your database.

Clone this wiki locally