title: Creating a Custom Action in an EntitySetController
body: <p>I have an oData application in .Net 4.5.  oData end points are working fine, but I want to create a custom action on the controller to set a flag on a Customer record when given an email address.  </p>
  
  <p>Here is my client code (using AngularJS):</p>
  
  <pre><code>    $http({
          method: 'POST',
          url: '/odata/Customers/SetAlertFlag',
          data: { 'email': 'test@test.com'}
      }).success(function (data, status, headers, config) {
          // ...
      }).error(function (data, status, headers, config) {
          // ...
      });
  </code></pre>
  
  <p>Here is my server code:</p>
  
  <pre><code>public class CustomersController : EntitySetController&lt;Customer, int&gt;
  {
      private DBEntities db = new DBEntities();
  
      // ... other generated methods here
  
  
      // my custom method
      [HttpPut]
      public Boolean SetAlertFlag([FromBody] string email)
      {
          return true;
      }
  }
  </code></pre>
  
  <p>The server method never gets called.  When I type this URL in the browser <code>http://localhost:60903/odata/Customers/SetAlertFlag</code> I get this error:  "Invalid action detected. 'SetAlertFlag' is not an action that can bind to 'Collection([Skirts.Models.Customer Nullable=False])'."</p>
  
  <p>Can EntitySetController classes not have custom methods?  How else should I do this?</p>