Using ASP.NET MVC 4 Web API
public IEnumerable<Item> GetAll(GetItemRequest request) {
This throws an error, Object reference not set to an instance of an object., where request is null.
public IEnumerable<Item> GetAll(int itemId) {
This works just fine, where itemId is non-null.
GetItemRequest model has a single property, public int itemId { get; set; }
What am I missing?
Try this: