Thursday, March 17, 2011

The AddQueryOption method returns a new instance of IQueryable. So you need to modify your code to do:

r = r.AddQueryOption("id", CompanyId); 

One other thing: The client library does not support reading responses to service operations returning enumeration of primitive or complex types. So for this to work the Equipment type must be an entity type.

GOOOOOD Link

http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/bfdfa8cc-0660-4092-9d6e-85bdb6997616


Wednesday, March 16, 2011

jbar

MVC Magic

View :

using (Html.BeginForm()) {
<input type="submit" value="Delete">
}

Controller :

[HttpPost]
public ActionResult DeleteLink(int id, FormCollection collection)
{

}

How view determine which field is key and method contains first param for key value???

MOBY compare model.fields and controllerMethod.params? Need check

Tuesday, March 15, 2011

POST for [WebInvoke] method

Data service method Comp(...)

1. Param in SetServiceOper... and UriTemplate param value should be exect the same (The name of method itself doesn't matter)

2. Comp/1 - doesn't work here (it is strange since documentation say otherwice)
Only way to pass parameter Comp?id=1 - it's work












PUT/POST OData with fiddler
















The crucial thing here : Don't fotget to include namespces to the entity tag, since all others stuff is just copy/paste from GET request. These namespaces are taken from the parent tag of entity of GET request.
Why this blog is usefull for me.

1/ Practizing english
2/ Don't forget something necessary

HYHY