1

I am trying to create external content type programmatically with SharePoint 2010. Here is the MSDN link which I am using for reference.

I have created a console application and put the same code as provided. But I am facing issue in below line:

// Make a new Contact LobSystem
            // NOTE: Assume that the "AdventureWorks" LobSystem 
            // does not already exist.
            LobSystem adventureWorksLobSystem = 
                contactModel.OwnedReferencedLobSystems.Create(
                "AdventureWorks", true, SystemType.Database);

I am not able to pass value of SystemType.Database. I am not able to find what could be the use of it as well as how can I pass that value. Can anyone tell me what should be the value and how to pass it?

Thanks in advance.

1 Answer 1

1

You need to add reference of Microsoft.BusinessData.dll. Then add namespace Microsoft.BusinessData.MetadataModel. This will enable you to use access SystemType enum.You can use different values of this enum like SystemType.DataBase,SystemType.WebService,SystemType.Custom,SystemType.Wcf,SystemType.DotNetAssembly.Please refere this link for more details.Hope this will work for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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