Пример #1
0
        /// <summary>
        /// 修改角色
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public int UpdateRoleDirectory(RoleDirectory info)
        {
            Dictionary <string, object> keyValuePairs = info.ToDictionary();

            keyValuePairs.Remove("Id");
            return(aideIRoleDirectory.Update(keyValuePairs, $"id={info.Id}"));
        }
Пример #2
0
        /// <summary>
        /// 新增角色
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public int InsertRoleDirectory(RoleDirectory info)
        {
            Dictionary <string, object> keyValuePairs = info.ToDictionary();

            keyValuePairs.Remove("Id");
            return(aideIRoleDirectory.Insert(keyValuePairs));
        }