initialize-ef-core-dbcontext

Initialize EF Core DbContext for an ASP.NET Core project using EF Core Power Tools CLI. Use when the user wants to scaffold a database context, generate entity models from an existing database, or set up Entity Framework Core with connection strings and dependency injection.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "initialize-ef-core-dbcontext" with this command: npx skills add jim60105/copilot-prompt/jim60105-copilot-prompt-initialize-ef-core-dbcontext

Initialize EF Core DbContext

Set up Entity Framework Core DbContext using EF Core Power Tools CLI.

Pre-requisite

  1. Ensure the Git working tree is clean:
    git status
    
    If the working directory is not clean, stop execution.

Steps

  1. Use EF Core Power Tools CLI to generate the DbContext:

    efcpt "Server=(localdb)\MSSQLLocalDB;Initial Catalog=ContosoUniversity;Trusted_Connection=True;Encrypt=false" mssql
    

    Note: Use the correct connection string according to the project requirements.

  2. Run dotnet build to verify everything compiles.

  3. Configure Program.cs for DI and appsettings.json for connection strings. Reference efcpt-readme.md for instructions. Ensure necessary namespaces are used.

  4. Run dotnet build to verify everything compiles.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

update-github-actions-version

No summary provided by upstream source.

Repository SourceNeeds Review
General

create-blog-post

No summary provided by upstream source.

Repository SourceNeeds Review
General

docx

No summary provided by upstream source.

Repository SourceNeeds Review