Guest User

Untitled

a guest
Jan 19th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. public class DapperIoC : OrmTypes
  2. {
  3. internal override IServiceCollection AddOrm(IServiceCollection services, IConfiguration configuration = null)
  4. {
  5. IConfigurationSection dbConnectionSettings = ResolveConfiguration.GetConnectionSettings(configuration)
  6. .GetSection("ConnectionStrings");
  7.  
  8. services.Configure<DataSettings>(dbConnectionSettings);
  9. services.AddScoped<IDatabaseFactory, DatabaseFactory>();
  10.  
  11. services.AddScoped<IUserRepository, UserRepository>();
  12. services.AddScoped<ITaskToDoRepository, TaskToDoRepository>();
  13.  
  14. return services;
  15. }
  16. }
Add Comment
Please, Sign In to add comment