Docs / IMooDbContextFactory Reference

IMooDbContextFactory Reference

Role#

IMooDbContextFactory creates MooDbContext instances for caller-supplied targets.

Methods#

</> C#
MooDbContext Create(string connectionString)
MooDbContext Create(SqlConnection connection)

Key points#

  • use this for runtime database selection
  • the application still decides which connection string or connection to use
  • the factory only creates the MooDbContext instance from that chosen target