1

Closed

SingleResult<T> doesn't work

description

    public class CustomersController : ODataController
    {
        [Queryable]
        public SingleResult<Customer> Get([FromODataUri]int key)
        {
            return
                System.Web.Http.SingleResult.Create(new[] { new Customer { ID = 42 } }.AsQueryable());
        }
    }
throws a 500 with this error message

Unhandled Exception: System.AggregateException: One or more errors occurred. ---
System.InvalidOperationException: The given model does not contain the type 'S
ystem.Web.Http.SingleResult`1[SingleResult.Customer]'.
This is a regression introduced with this change.
Closed Aug 30, 2013 at 6:23 PM by kichalla
Verified.

comments

raghuramn wrote Aug 15, 2013 at 10:00 PM