public async Task <WrapperSimpleTypesDTO> EliminarCategoriaRepresentante(CategoriasRepresentantes categoriaRepresanteParaBorrar)
        {
            using (SportsGoEntities context = new SportsGoEntities(false))
            {
                CategoriasRepository categoriasRepo = new CategoriasRepository(context);
                int?codigoRepresentante             = await categoriasRepo.BuscarCodigoCandidatoDeUnaCategoriaRepresentante(categoriaRepresanteParaBorrar.Consecutivo);

                if (!codigoRepresentante.HasValue)
                {
                    throw new InvalidOperationException("No se pudo hallar el codigo del representante para borrar la categoria y modificar el plan!.");
                }

                categoriasRepo.EliminarCategoriaRepresentante(categoriaRepresanteParaBorrar);

                PlanesRepository planRepo = new PlanesRepository(context);
                int?codigoPlanExistente   = await planRepo.BuscarCodigoPlanUsuarioPorCodigoRepresentante(codigoRepresentante.Value);

                if (!codigoPlanExistente.HasValue)
                {
                    throw new InvalidOperationException("No se pudo hallar el plan del representante para crear la categoria para el!.");
                }

                // Se "BAJA" el contador de categorias 1
                PlanesUsuarios planUsuarioExistente = await planRepo.ModificarNumeroCategoriasUsadas(codigoPlanExistente.Value, -1);

                WrapperSimpleTypesDTO wrapperEliminarCategoriaRepresentante = new WrapperSimpleTypesDTO();

                wrapperEliminarCategoriaRepresentante.NumeroRegistrosAfectados = await context.SaveChangesAsync();

                if (wrapperEliminarCategoriaRepresentante.NumeroRegistrosAfectados > 0)
                {
                    wrapperEliminarCategoriaRepresentante.Exitoso = true;
                }

                return(wrapperEliminarCategoriaRepresentante);
            }
        }