I'm creating a library for managing permissions. The library exposes multiple methods to create, attach, bind, update, delete permissions and permission groups.
This is the GitHub project link
It uses SQLServer and some pre-defined tables to store those. It uses EFCore 5
Now my question is, If I shipped my library that depends on EFCore. How my end user address these?
If he installs it from NuGet - How he could run the migrations inside it? so that required tables will be created on his DB. Can he run Update-Database on his PM targeting the library?
PM:\ Update-DatabaseIf it's a NuGet library how can I allow him to pass a connection string from his project where he is installing it. I know about passing like this to point to a library project, Is that the same need to follow? Does this require him to install any separate EFCore related libs?
services.AddDbContext<PermissionContext>(options => { options.UseSqlServer(Configuration.GetConnectionString("JetTask"), assembly => assembly.MigrationsAssembly(typeof(PermissionContext).Assembly.FullName)); });If he's already using another ORM like Dapper, Will he still need to install any other dependencies to run my library since it depends on EFCore? Or does the main library installs the dependency components from NuGet while he installs?