Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have two Parent/Child tables in SQL Server and I would like to expose them to sharepoint by using BCS and display the results in a web part as parent/child relationship using a treeview.

BCS exposes 4 methods, Real List, create, read item, update and delete, which are used when an external list is created. These operations are used by the list.

I have created a method (WCF) which returns a collection of items based on ID

List<Customer>GetItemsById(int parentId)
{
// code here
return items
}

So, how can I expose this method via BCS since there are only 4 methods that can be used?

Or do I have to create external lists firt in sharepoint and use the Server Side Object Model code to perform a Parent/child relationship?

Thanks in advance

share|improve this question
add comment

1 Answer 1

By creating association between related entities you can get parent/child relationship. BCS supports this scenario.

Although the article doesn't have your specific scenario, it explains step by step how to achieve parent/child relationship using Visual Studio BCS solution:

parent/child relationship

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.