I have three methods being called separately in the controller with JSON. Each of them returns me Id Name
.
I need to call these three methods in the same function in controller . How can I join all three methods in the same function?
[HttpPost]
public ActionResult GetMessageClassByResourceByDevice(int resourceId, string deviceName)
{
return Json(EventFlow.GetMessageClassByResourceByDevice(resourceId, deviceName)
.Select(f => new { EventMessageClassId = f.Id, FullName = f.Name }));
}
[HttpPost]
public ActionResult GetMessageGroupByResourceByDevice(int resourceId, string deviceName)
{
return Json(EventFlow.GetMessageGroupByResourceByDevice(resourceId, deviceName)
.Select(f => new { EventMessageGroupId = f.Id, FullName = f.Name }));
}
[HttpPost]
public ActionResult GetMessageByResourceByDevice(int resourceId, string deviceName)
{
return Json(EventFlow.GetMessageByResourceByDevice(resourceId, deviceName)
.Select(f => new { EventMessageId = f.Id, FullName = f.Name }));
}