public ActionResult GetCustomer([ProtoPost] GetCustomerRequest req) { // create a response var resp = new GetCustomerResponse { cust = new Customer { id = req.id, name = "Name of cust " + req.id, address = new Address { line1 = "27 wood lane", zip = "pl1" } } }; return new ProtoResult(resp); }
public override object Execute(HttpContext context, object request) { // inspect the incoming request var req = (GetCustomerRequest)request; // create a response var resp = new GetCustomerResponse { cust = new Customer { id = req.id, name = "Name of cust " + req.id, address = new Address { line1 = "27 wood lane", zip = "pl1" } } }; return resp; }