Skip to content

js proxy does not ignore parameters covered by an IModelBinder #36

Open
@ryepup

Description

@ryepup

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions