Saturday 15 March 2014

silverlight - How to pass a collection of Entities to .NET RIA Data Service? -


Is it possible to pass the collection of objects in the RIA data service query? I have no problem sending an array of one unit, one int or primitive types, but as soon as I declare a method like this

  Public Zero GetLessonsConflicts (Lesson [] lesson) {}  

I get a compilation error

"The Operation Name 'Gatelesses Conflicts' is not in accordance with the required signature parameter type one unit type or predefined Serializable type "

I save the data First, I'm just trying to do some validation on the server side. I have tried the list, IEnumerable etc.

thanks

I think that The problem is actually the lack of a return value as I think, you can identify domain operations by conference or specialty. You are not showing an attribute, so the RIA is trying to match the Convention.

For example, by convention, an insert method:

  • Include, add or create a method name prefix, e.g.

A query method:

  • be public
  • A custom domain operation

    • be public
    • back zero
    • as a first parameter Is the unit.

    Edit: See Rami A's comment below. I believe that this time it was true but I am not currently working with this technology, so I am not sufficient to update this reply except by leaving this note that it can be wrong.

    Or you can use features like [insert], [delete], [update], [query], [custom], from my docs, all features require name conferences - It's not clear from them, what do I, [query] and [custom] attributes get?

    As well as domain operations, you can define services operation (using the [ServiceOperation] attribute) and invoke operation.

    Maybe it can be helpful (though I think it's a bit old).


No comments:

Post a Comment