Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6726011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:52:32+00:00 2026-05-26T09:52:32+00:00

Trying to implement a domain service in a SL app and getting the following

  • 0

Trying to implement a domain service in a SL app and getting the following error:

Parameter ‘spFolderCreate’ of domain method ‘CreateSharePointFolder’ must be an entity type exposed by the DomainService.

 [EnableClientAccess()]
public class FileUploadService : DomainService
{
    public void CreateSharePointFolder(SharePointFolderCreate spFolderCreate)
    {
        SharePointFolder spf = new SharePointFolder();
            spf.CreateFolder_ClientOM(spFolderCreate.listName, spFolderCreate.fileName);
    }

 [OperationContract]
    void CreateSharePointFolder(SharePointFolderCreate spFolderCreate);

[DataContract]
public class SharePointFolderCreate
{
    private string m_listName;
    private string m_fileName;

    [DataMember]
    public string listName
    {
        get { return m_listName; }
        set { m_listName = value; }
    }

    [DataMember]
    public string fileName
    {
        get { return m_fileName; }
        set { m_fileName = value; }
    }
}

So am I missing something simple here to make this all work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:52:33+00:00Added an answer on May 26, 2026 at 9:52 am

    It may be that the framework is inferring the intended operation because you have the word “Create” prefixing the function name (CreateSharePointFolder). Details of this behaviour can be found here

    Although that is all fine for DomainServices and EntityFramework, following the information in that article, it can be inferred that methods beginning “Delete” will be performing a delete of an entity, so must accept an entity as a parameter. The same is true for “Create” or “Insert” prefixed methods. Only “Get” or “Select” methods can take non-entity parameters, making it possible to pass a numeric id (for example) to a “Get” method.

    Try changing your method name temporarily to “BlahSharePointFolder” to see if it is this convention of inferrance that’s causing your problem.

    Also, as there is no metadata defined for your SharePointFolderCreate DC, you might need to decorate the class (in addition to the [DataContract] attribute) with the [MetadataType] attribute. You will see how to implement this if you used the DomainServiceClass wizard and point to an EF model. There is a checkbox at the bottom for generating metadata. Somewhere in your solution.Web project you should find a domainservice.metadata.cs file. In this file, you will find examples of how to use the [MetadataType] attribute.

    For the RIA WCF service to work correctly with your own methods, you need to ensure that all entities existing on the parameter list have at least one member with a [Key] attribute defined in their metadata class, and that the entity is returned somewhere on your DomainService in a “Get” method.

    HTH

    Lee

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

nHibernate is giving the error : Custom type does not implement UserCollectionType: myApp.Domain.OrderLineCollection. BindingList
Trying to implement a UITableView of names similar to the built-in Contacts iPhone app
im trying to implement a custom error page, what i want to be able
I'm trying to implement blog post storage using mongo db. I've got two domain
I'm trying to implement compareTo on a domain class in grails so I can
I'm trying to implement i18n features in my grails app, but not only for
We’re trying to implement a data layer with ORM between our domain entities and
I'm trying to implement localization with routes I have the following: routes.MapRoute( DefaultLocalized, {lang}/{controller}/{action}/{id},
I am trying to make a cross domain HTTP request to WCF service (that
I am trying to implement a MultiValueField for IP Adress/Domain Name entries. It works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.