How can I use Entity API to integrate my entities with views? I've set my entity up with a custom controller but I want views integration.  I tried to follow the entity_test.module example, but it's for one bundle.  I want to create 4 bundles for my entity.  When I check views it does not appear in the list.

Here is my code:

function module_entity_info() {
  $return['module_content'] = array(
    'label' =&gt; t('Module Content'),
    'module' =&gt; 'module',
    'entity class' =&gt; 'ModuleContentClass',
    'controller class' =&gt; 'EntityAPIController',
    'views controller class' =&gt; 'EntityDefaultViewsController',
    'base table' =&gt; 'module_content',
    'fieldable' =&gt; TRUE,
    'entity keys' =&gt; array(
      'id' =&gt; 'cid',
      'bundle' =&gt; 'type',
    ),
    // Make use of the class' label() and uri() implementation by default
    'label callback' =&gt; 'entity_class_label',
    'uri callback' =&gt; 'entity_class_uri',
    'static cache' =&gt; TRUE,
    'bundles' =&gt; array(),
    'bundle keys' =&gt; array(
      'bundle' =&gt; 'type',
    ),
    'view modes' =&gt; array(
      'full' =&gt; array(
        'label' =&gt; t('Full content'),
        'custom settings' =&gt; FALSE,
      ),
      'teaser' =&gt; array(
        'label' =&gt; t('Teaser'),
        'custom settings' =&gt; FALSE,
      ),
    ),
    'module_property' =&gt; array(
      'label' =&gt; t('Property'),

      'entity class' =&gt; 'Entity',
      'controller class' =&gt; 'EntityAPIControllerExportable',
      'fieldable' =&gt; TRUE,
      'bundle of' =&gt; 'module_content',
      'exportable' =&gt; TRUE,
    ),
    'module_agent' =&gt; array(
      'label' =&gt; t('Agent'),
      'entity class' =&gt; 'Entity',
      'controller class' =&gt; 'EntityAPIControllerExportable',
      'fieldable' =&gt; TRUE,
      'bundle of' =&gt; 'module_content',
      'exportable' =&gt; TRUE,
    ),
    'module_open_house' =&gt; array(
      'label' =&gt; t('Open House'),
      'entity class' =&gt; 'Entity',
      'controller class' =&gt; 'EntityAPIControllerExportable',
      'fieldable' =&gt; TRUE,
      'bundle of' =&gt; 'module_content',
      'exportable' =&gt; TRUE,
    ),
    'module_office' =&gt; array(
      'label' =&gt; t('Office'),
      'entity class' =&gt; 'Entity',
      'controller class' =&gt; 'EntityAPIControllerExportable',
      'fieldable' =&gt; TRUE,
      'bundle of' =&gt; 'module_content',
      'exportable' =&gt; TRUE,
    ),
  );

  return $return;
}

function module_entity_info_alter(&amp;$entity_info) {
  foreach (module_content_get_types() as $type =&gt; $info) {
    $entity_info['module_content']['bundles'][$type] = array(
      'label' =&gt; $info-&gt;label,
    );
  }
}

function module_content_get_types($type = NULL) {
  $types = entity_load_multiple_by_name('module_content', isset($type) ? array($type) : FALSE);
  return isset($type) ? reset($types) : $types;
}


I think something is wrong with either module_content_get_types() or module_entity_info_alter because when I try to use dpm statements in those functions nothing is output.  Please advise on any changes that should be made to improve my entity definition.  If you need to see additional code I can provide that as well.
You dont create views integration for bundles but for entities. The reason is that each bundle by definition stores it's core data the same way.

Think of node types = bundles. When you create a view you select to use nodes (Content) not if you want to use articles, pages, blog posts etc.