public override void CreateRole(string rolename) { if (rolename.IndexOf(',') > 0) { throw new ArgumentException("Role names cannot contain commas."); } if (RoleExists(rolename)) { throw new ProviderException("Role name already exists."); } Sys_Role role = new Sys_Role(); role.ApplicationName = ApplicationName; role.RoleName = rolename; _roleRepository.Insert(role); }
/// <summary> /// 写入实体数据 /// </summary> /// <param name="entity">实体类</param> /// <returns></returns> public long Insert(sys_role entity) { return(_Sys_RoleRepositoryS.Insert(entity)); }