Why you dont use Rest

  ...or if you are too deep in your code do something like this

 from 1..to 100 
http://localhost:8000/MyService/EntityA/intityid=00001?start=1?limit100
 from 101..to 200 
http://localhost:8000/MyService/EntityA/intityid=00001?start=101?limit200
 from 201..to 300 
http://localhost:8000/MyService/EntityA/intityid=00001?start=201?limit300



......

        [WebGet(UriTemplate = "/intityid={intityid}?start={start}?
size={size}")]
        [WebDispatchFormatter]
        [OperationContract]
        [OperationAuthentication]
        ContractEntity GetSmallListStartSize(string intityid,string
start, string size);

       or

      IList<Domain.Client> GetSmallListStartSize(string
intityid,string start, string size);


......

   convert stringstart to integerStart
   convert stringsize to integerSize


    IList<Domain.Client> my_list =
                ClientDao.GetSmallListFromTo(integerStart,
integerSize);
            return new Contracts.ContractListofClients(my_list);

......

 [Transaction(ReadOnly = true)]
        public IList<Client> GetSmallListFromTo(int start, int size)
        {
            Log.InfoFormat("GetSmallListFromTo start {0}  size
{1}",start,size);
            return CurrentSession.CreateQuery("FROM Client Order by
ClientId")
                    .SetMaxResults(size)
                    .SetCacheable(true)
                    .SetFirstResult(start)
                    .List<Client>();

        }


-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to