ohm
ohm
CC#
Created by ohm on 2/7/2024 in #help
ConnectionStrings passed from class to class
actually it's the first one that works ahah, when it's called from another program if i'm running just the repos through swagger they all register fine the moment i'm trying to call them through the ProcessGameJson all hell breaks loose
15 replies
CC#
Created by ohm on 2/7/2024 in #help
ConnectionStrings passed from class to class
not really sure what i'm doing tbh, just have to do this thing for an internship and it's just a mere prototype, so even if it doesn't have any security check it's fine
15 replies
CC#
Created by ohm on 2/7/2024 in #help
ConnectionStrings passed from class to class
yeah sure!
public static class DepedencyInjection
{
public static IServiceCollection AddInfrastructure(this IServiceCollection services)
{
services.AddScoped<IGamesRepo, GamesRepo>();
services.AddScoped<IPlayersRepo, PlayersRepo>();
services.AddScoped<ITeamsRepo, TeamsRepo>();
services.AddScoped<IProcessGameJson, ProcessGameJson>();

return services;
}
}
public static class DepedencyInjection
{
public static IServiceCollection AddInfrastructure(this IServiceCollection services)
{
services.AddScoped<IGamesRepo, GamesRepo>();
services.AddScoped<IPlayersRepo, PlayersRepo>();
services.AddScoped<ITeamsRepo, TeamsRepo>();
services.AddScoped<IProcessGameJson, ProcessGameJson>();

return services;
}
}
public static class DependencyInjection
{
public static IServiceCollection AddApplication(this IServiceCollection services)
{
services.AddScoped<IGameService, GameService>();
services.AddScoped<IPlayerService, PlayerService>();
services.AddScoped<ITeamService, TeamService>();
services.AddScoped<IProcessGameJsonService, ProcessGameJsonService>();

return services;
}
}
public static class DependencyInjection
{
public static IServiceCollection AddApplication(this IServiceCollection services)
{
services.AddScoped<IGameService, GameService>();
services.AddScoped<IPlayerService, PlayerService>();
services.AddScoped<ITeamService, TeamService>();
services.AddScoped<IProcessGameJsonService, ProcessGameJsonService>();

return services;
}
}
15 replies