public string SaveUserRights(string model)
        {
            try
            {
                var roleActions = JsonConvert.DeserializeObject <IEnumerable <UserRightsModel> >(model);

                foreach (UserRightsModel roleAction in roleActions)
                {
                    var roleActionEntity = new TblRoleMenuMap
                    {
                        IsInsert       = roleAction.IsInsert,
                        IsView         = roleAction.IsView,
                        IsEdit         = roleAction.IsEdit,
                        IsDelete       = roleAction.IsDelete,
                        IsChangeStatus = roleAction.IsChangeStatus,
                        RoleMenuPk     = roleAction.RoleMenuPk,
                        MenuId         = roleAction.MenuId,
                        RoleId         = roleAction.RoleId
                    };

                    _tblRoleMenuservice.Update(roleActionEntity);
                }
                return(string.Empty);
            }
            catch (Exception ex)
            {
                return(CommonHelper.GetErrorMessage(ex, false));
            }
        }
        //private UserAccessRightsModel Map(TblRoles unit)
        //{
        //    return _mapper.Map<RolesModel>(unit);
        //}

        public int Update(TblRoleMenuMap entity)
        {
            //TblRoles obj = _mapper.Map<RolesModel, TblRoles>(entity);
            _repository.Update(entity);
            return(entity.RoleId);
        }