Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DapperIoC : OrmTypes
- {
- internal override IServiceCollection AddOrm(IServiceCollection services, IConfiguration configuration = null)
- {
- IConfigurationSection dbConnectionSettings = ResolveConfiguration.GetConnectionSettings(configuration)
- .GetSection("ConnectionStrings");
- services.Configure<DataSettings>(dbConnectionSettings);
- services.AddScoped<IDatabaseFactory, DatabaseFactory>();
- services.AddScoped<IUserRepository, UserRepository>();
- services.AddScoped<ITaskToDoRepository, TaskToDoRepository>();
- return services;
- }
- }
Add Comment
Please, Sign In to add comment