locked
Service Operations return types RRS feed

  • Question

  • Hello,

    I created a WCF Data Service wich uses entity framework and as I am aware of, service operations don't support collections or complex objects (either as return type or parameter) on client side (I must interpret the response myself). I've tried to extend the partial class entities adding a new property to it (in the same class but different file). U can see the example below:

    namespace SiomeNamespace
    {
        public partial class Entities
        {
            public IQueryable<string> MyPropery
            {
                get
                {
                    return this.TestTables.Select(t => t.TestName);
                }
            }

        }
    }

    When I try to give acces or to acces this resource, the code fails, throwing an ArgumentException - The given name 'MyProperty' was not found in the entity sets.Parameter name: name

    config.SetEntitySetAccessRule("MyProperty", EntitySetRights.AllRead | EntitySetRights.AllWrite);

    Why isn't this possible ?

    Thank you

    Sunday, May 27, 2012 7:03 PM

Answers

All replies