Open
Description
I use IModelBinder
to supply default arguments to my controller actions for things like "current logged in user", so my controller action looks like:
public SaveResult Save(SaveRequest req, IUser currentUser){
return DB.save(res, currentUser);
};
with the model binder filling in the correct value for currentUser
.
The JS proxy generated for Save
should ignore the IUser
parameter, since it will be bound automatically by WebApi.
http://www.asp.net/web-api/overview/formats-and-model-binding/parameter-binding-in-aspnet-web-api