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); }
public User findUserById() { return(proxy.ReadById <User>(1L)); }
// Find Merchant by id public Merchant findMerchantById(long?id) { return(Proxy.ReadById <Merchant>(id)); }