public JsonResult SaveForkflowMapping(int?actionid, int?formid, List <WorkflowUsers> worflowusers, WorkflowMappingDetails mappingdata) { try { var datausers = worflowusers; //var datausers = JsonConvert.DeserializeObject<List<WorkflowUsers>>(worflowusers); var data = AutoMapper.Mapper.Map <WORKFLOW_STATE>(mappingdata); if (actionid.HasValue) { //data.ACTION_ID = actionid.Value; } List <string> useridlist = new List <string>(); foreach (var user in datausers) { useridlist.Add(user.User_Id); } //data.WORKFLOW_STATE_USERS = _userBLL.GetUsersByListId(useridlist); _workflowSettingBLL.SaveWorkflowState(data); JsonResult json = new JsonResult(); json.ContentType = "Application/json"; json.Data = data; return(json); } catch { //JsonResult json = new JsonResult(); //json.Data = "error"; return(null); } }