private IEnumerable <Book> QueryForBooksByAuthor(ISpaceProxy spaceProxy)
        {
            var books = new HashSet <Book>();

            var query = new SqlQuery <Author>("LastName=?");

            query.SetParameter(1, "AuthorX");

            Author[] authors = spaceProxy.ReadMultiple <Author>(query);

            foreach (Author author in authors)
            {
                books.Add(spaceProxy.ReadById <Book>(author.BookId));
            }

            return(books);
        }
Пример #2
0
 public User findUserById()
 {
     return(proxy.ReadById <User>(1L));
 }
Пример #3
0
 // Find Merchant by id
 public Merchant findMerchantById(long?id)
 {
     return(Proxy.ReadById <Merchant>(id));
 }