public async static Task Main(string[] args) { Console.WriteLine("Comenzó Generador de Data!"); connection = new SqlConnection(connectionString); nivelRepository = new NivelRepository(connection); lineaCarreraRepository = new LineaCarreraRepository(connection); var conocimientoRepository = new ConocimientoRepository(connection); participanteRepository = new ParticipanteRepository(connection); ratingCursoRepository = new RatingCursoRepository(connection); var authenticationRepository = new AuthenticationRepository(connection); cursoRepository = new CursoRepository(connection); var myProfile = new AutoMapperProfiles(); var configuration = new MapperConfiguration(cfg => cfg.AddProfile(myProfile)); var mapper = new Mapper(configuration); var participanteService = new ParticipanteService(participanteRepository, conocimientoRepository, mapper, null); _authService = new AuthenticationService(authenticationRepository, participanteService, mapper); try { _faker = new ParticipanteFaker(); await GenerarEscaladores(); await GenerarSherpas(); await GenerarAdmin(); await GenerarCursoImagenes(); for (int i = 0; i < 3; i++) { await GenerarRatingCursosAleatorios(); } } catch (Exception ex) { Console.WriteLine("Excepción: " + ex.Message); } Console.WriteLine("Finalizó Generador Data!"); Console.ReadLine(); }
public LineaCarreraService(ILineaCarreraRepository repository, IMapper mapper) { this.mapper = mapper; this.repository = repository; }