// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews(); services.AddSingleton(ConfigBuilder.BuildAppSettings()); services.AddSingleton <IDBConfig, DBConfig>(); //Injetar para cada tipo services.AddSingleton <IDBService <Players.Entity.Players>, DBService <Players.Entity.Players> >(); services.AddSingleton <IDBService <Monsters.Entity.Monsters>, DBService <Monsters.Entity.Monsters> >(); services.AddSingleton <IPlayersServices, PlayersService>(); services.AddSingleton <IMonstersServices, MonstersService>(); }