public async Task <WrapperSimpleTypesDTO> CrearAnunciosContenidos(List <AnunciosContenidos> anuncioContenidoParaCrear) { using (SportsGoEntities context = new SportsGoEntities(false)) { AnunciantesRepository anuncianteRepo = new AnunciantesRepository(context); anuncianteRepo.CrearAnunciosContenidos(anuncioContenidoParaCrear); WrapperSimpleTypesDTO wrapperCrearAnunciosContenido = new WrapperSimpleTypesDTO(); wrapperCrearAnunciosContenido.NumeroRegistrosAfectados = await context.SaveChangesAsync(); if (wrapperCrearAnunciosContenido.NumeroRegistrosAfectados > 0) { wrapperCrearAnunciosContenido.Exitoso = true; } return(wrapperCrearAnunciosContenido); } }