public UnitOfWork(DbContext dbContext, APIModelExample.MasterNode startMasterNode) { DBContext = dbContext; StartMasterNode = startMasterNode; }
public static void RegisterYourLibrary(this IServiceCollection services, DbContext dbContext, APIModelExample.MasterNode startMasterNode) { if (dbContext == null) { throw new ArgumentNullException(nameof(dbContext)); } services.AddScoped <IUnitOfWork, UnitOfWork>(uow => new UnitOfWork(dbContext, startMasterNode)); }