public async Task <WrapperSimpleTypesDTO> CrearPlanesContenidos(List <PlanesContenidos> planesContenidosParaCrear) { using (SportsGoEntities context = new SportsGoEntities(false)) { PlanesRepository planesRepo = new PlanesRepository(context); planesRepo.CrearPlanesContenidos(planesContenidosParaCrear); WrapperSimpleTypesDTO wrapperCrearPlanesContenidos = new WrapperSimpleTypesDTO(); wrapperCrearPlanesContenidos.NumeroRegistrosAfectados = await context.SaveChangesAsync(); if (wrapperCrearPlanesContenidos.NumeroRegistrosAfectados > 0) { wrapperCrearPlanesContenidos.Exitoso = true; } return(wrapperCrearPlanesContenidos); } }