views:

86

answers:

0

I need recommendations on how to solve / structure a solution to the following problem.

In an asp.net web application i'll have to visualise results returned from a web service call. Im planning to use a repeater server control and bind this with an objectdatasource.

The service returns a result of the form:

public class SearchResult : IExtensibleDataObject
{
    [DataMember]
    public Guid SearchId { get; set; }

    [DataMember]
    public DateTime Timestamp { get; set; }

    [DataMember]
    public int Offset { get; set; }

    [DataMember]
    public int TotalResults { get; set; }

    [DataMember]
    public IList<ResultDocumentData> Documents { get; set; }

It is the collection of Documents that I need to visualise with a repeater which will be associated with an ObjectDataSource. The datasource should work on the type ResultDocumentData; the collection property in the class SearchResult.

I think I need to wrap the call to the webservice in a dataaccess layer class, that will have a getDocuments method returning an IList, that the ObjectDataSource can use as its SelectMethod.

I think I could make this work, but I would like to know how to do it in an elegant way. Can you give me general recommendations and/or recommendations for the following:

  • WebProject Folderstructure + naming
  • Naming conventions for the name of the service wrapper class
  • Creating the service reference