Does Breeze have something like .SingleOrDefault()?
I'm getting my feet wet with Breezejs -- really cool! I have a case where I am using a parameterized query (so I'm using .withParameters() in my Breeze query).
My query will always return a single entity. In fact, it's defined like so on the WebApi controller:
public MyEntity GetThisSpecialEntity(int theParameter) {}
(note that it doesn't return IQueryable or IEnumerable, but just the entity.
The the query executes, the data that comes back from breeze appears to be an array of 1, with my entity in it.
Now I could just take data[0] and assign it, but I was wondering if that's what I'm supposed to do, or if Breeze has something like LINQ's .SingleOrDefault() method?