Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Ability to use EFCore Scaffold-DbContext using this package #95

Copy link
Copy link
@RothAndrew

Description

@RothAndrew
Issue body actions

Feature request

Is your feature request related to a problem? Please describe.

I'd like the ability to use EFCore's Scaffold-DbContext with this package, so that the entities that get created use the right attributes and can be used with the supabase client.

Describe the solution you'd like

A command such as:

dotnet ef dbcontext scaffold --project foo.csproj --startup-project foo.csproj --configuration Debug Host=localhost;Port=5432;Username=supabase_admin;Password=your-super-secret-and-long-postgres-password;Database=postgres Supabase.Postgrest --data-annotations --context MyDbContext --context-dir Context --force --output-dir Entities --schema public

completes successfully, and creates a class for each database table, which use the correct attributes ([Table], [PrimaryKey], [Column], etc)

Actual result:

System.InvalidOperationException: Unable to find expected assembly attribute [DesignTimeProviderServices] in provider assembly 'Supabase.Postgrest'. This attribute is required to identify the class which acts as the design-time service provider factory for the provider.

Describe alternatives you've considered

I can run the scaffold command using the Npgsql.EntityFrameworkCore.PostgreSQL package, and it creates the right classes for me, but they have the wrong attributes and they don't inherit BaseModel, which causes the supabase client to error if you try to use them. I would have to manually edit every class to have the right attributes and inheritance.

Additional context

none

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.