Arbitrary types


  • I was hoping that the July CTP would support arbitrary (complex) types for operation parameters and query results in domain services, but it seems it isn’t possible yet. I have the following problem and I really hope that someone can give me a solution or workaround. I tried a lot of things with Include and Assocation attributes but I can't find a good solution.

    First of I would like to send a collection of Criteria objects. Something like this:

    public … SearchRestaurants(IEnumerable<Criteria> criteria)

    And secondly I would like to return a kind of container object which holds my data but also extra information and messages.
    public SearchResponse<Restaurant> SearchRestaurants(IEnumerable<Criteria> criteria)
    return new SearchResponse<Restaurant>()
    Data = Context.Restaurants,
    DidYouMean = …,
    Messages = …
    All help, ideas and tips are appreciated.
    Tuesday, July 14, 2009 3:28 AM