/// <summary>
        ///
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public override bool Save(UserSecurity model)
        {
            ArgumentAssertion.IsNotNull(model, "model");

            var result = base.Save(model);

            //if (model.PersistentState == PersistentState.Persistent)
            //{
            //    SyncToJux360(model);
            //}
            return(result);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="dataRow"></param>
        /// <returns></returns>
        protected override AnonymousAccount Convert(DataRow dataRow)
        {
            ArgumentAssertion.IsNotNull(dataRow, "dataRow");
            var model = base.Convert(dataRow);

            if (dataRow.Table.Columns.Contains("AccessToken"))
            {
                model.Token = dataRow.Serialize <AnonymousAccount.AccountToken>();
            }

            return(model);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        protected override IDictionary <string, object> Convert(AnonymousAccount entity)
        {
            ArgumentAssertion.IsNotNull(entity, "entity");

            var sqlParams = base.Convert(entity);

            if (null != entity.Token)
            {
                var tokenParams = entity.Token.ToDictionary();
                foreach (var pair in tokenParams)
                {
                    if (sqlParams.ContainsKey(pair.Key))
                    {
                        continue;
                    }
                    sqlParams[pair.Key] = pair.Value;
                }
            }

            return(sqlParams);
        }