0

I need to send 3 diferentes object from angular controller to Asp MVC controller using restangular, $http or resources, my objects are:

Employee ={Name:"Amy", Age:"17", Email:"[email protected]"};
User={UserName:"Amy17", Password:"test123"};
Role ={IdRole="11", Name:"User"}

and my method in asp mvc controller

Public void GetInfo(Employee _employee, User _user, Role _role)
{....}

I dont want to use a viewmodel, like:

Public Class VmGetInfo
{
Public Employee Employee {get; set;}
Public User User {get; set;}
Public Role Role {get; set;}
}

how i can do that using?

5
  • I dont want to use a viewmodel, like...any particular reason why you don't want to use that? Because that would definitely be right. Commented Dec 21, 2014 at 23:37
  • @ethorn10 rigth now i have around 100 classes, i dont want to create 200 or more vm classes for the view, is just a mess. Commented Dec 22, 2014 at 0:27
  • Is this a get method, or a post method? Commented Dec 23, 2014 at 20:37
  • Any reason you can't just send an object with those keys (_employee, _user, _role)? Commented Dec 23, 2014 at 21:09
  • @jedd.ahyoung, i try but does not work, just the first parameter got the data the other ones get null :s Commented Dec 24, 2014 at 1:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.