GustavEikaas/easy-dotnet.nvim

feat(ef):๐ŸŽ Entity framework support

Closed this issue ยท 4 comments

Hi, I wonder how would you feel if we add commands for entity framework:

Database (necessary)

  • dotnet ef database drop
  • dotnet ef database update

DbContext (Not sure if necessary)

  • dotnet ef dbcontext info
  • dotnet ef dbcontext list
  • dotnet ef dbcontext optimize
  • dotnet ef dbcontext scaffold (typically one-shot)
  • dotnet ef dbcontext script

Migrations (necessary)

  • dotnet ef migrations add
  • dotnet ef migrations remove
  • dotnet ef migrations list
  • dotnet ef migrations bundle
  • dotnet ef migrations script //would it be with -o or as stdout?
  • dotnet ef migrations has-pending-model-changes //returns ex_code 1 if pending changes

Having a reliable way of creating a recreating migration is cool when developing database schemas

Awesome idea, I have also been thinking about this for some time. I feel like it might need some discussion first.

Initial thoughts

  • dotnet ef doesnt ship with sdk its a separate tool (requires readme on how to install)
  • What would the UI look like (when using dotnet ef previously i used it from the terminal)
  • Common usecases
  • Startup project vs project resolution

Anyone who wants this pls add a +1 in the comments

Resource: https://learn.microsoft.com/en-us/ef/core/cli/dotnet

  • Check installation
  • no-build
  • --startup-project
  • --project
  • --configuration?

Should support following commands

Database (necessary)

  • dotnet ef database drop
  • dotnet ef database update

DbContext (Not sure if necessary)

  • dotnet ef dbcontext info
  • dotnet ef dbcontext list
  • dotnet ef dbcontext optimize
  • dotnet ef dbcontext scaffold (typically one-shot)
  • dotnet ef dbcontext script

Migrations (necessary)

  • dotnet ef migrations add
  • dotnet ef migrations remove
  • dotnet ef migrations list
  • dotnet ef migrations bundle
  • dotnet ef migrations script //would it be with -o or as stdout?
  • dotnet ef migrations has-pending-model-changes //returns ex_code 1 if pending changes

I am closing this for now as the PR seems to cover the most basic of functionality. Ill rather make new issues for remaining functionality if requested