mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 02:32:50 +08:00
- 优化 支持动态操作 .IncludeByPropertyName 之后的 then.WhereDynamicFilter 操作;
This commit is contained in:
parent
699ddfe9c1
commit
679cf7efca
36
Examples/base_entity/AspNetRoleClaims/AspNetRoleClaims.cs
Normal file
36
Examples/base_entity/AspNetRoleClaims/AspNetRoleClaims.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.ComponentModel;
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Densen.Models.ids
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色声明
|
||||||
|
/// </summary>
|
||||||
|
[JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
|
||||||
|
public partial class AspNetRoleClaims
|
||||||
|
{
|
||||||
|
|
||||||
|
[DisplayName("ID")]
|
||||||
|
[JsonProperty, Column(IsPrimary = true, IsIdentity = true)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("角色ID")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string RoleId { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("角色声明")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string ClaimType { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("值")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string ClaimValue { get; set; }
|
||||||
|
|
||||||
|
[Navigate(nameof(RoleId))]
|
||||||
|
public virtual AspNetRoles AspNetRoles { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
39
Examples/base_entity/AspNetRoleClaims/AspNetRoles.cs
Normal file
39
Examples/base_entity/AspNetRoleClaims/AspNetRoles.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Densen.Models.ids
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色定义
|
||||||
|
/// </summary>
|
||||||
|
[JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
|
||||||
|
public partial class AspNetRoles
|
||||||
|
{
|
||||||
|
|
||||||
|
[DisplayName("ID")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsPrimary = true, IsNullable = false)]
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("角色")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("标准化名称")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string NormalizedName { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("并发票据")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string ConcurrencyStamp { get; set; }
|
||||||
|
|
||||||
|
//导航属性
|
||||||
|
[Navigate(nameof(AspNetUserRoles.RoleId))]
|
||||||
|
[DisplayName("角色表")]
|
||||||
|
public virtual List<AspNetUserRoles> AspNetUserRoless { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
39
Examples/base_entity/AspNetRoleClaims/AspNetUserClaims.cs
Normal file
39
Examples/base_entity/AspNetRoleClaims/AspNetUserClaims.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.ComponentModel;
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Densen.Models.ids
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户声明
|
||||||
|
/// </summary>
|
||||||
|
[JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
|
||||||
|
public partial class AspNetUserClaims
|
||||||
|
{
|
||||||
|
|
||||||
|
[DisplayName("ID")]
|
||||||
|
[JsonProperty, Column(IsPrimary = true, IsIdentity = true)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("用户ID")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string UserId { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("声明类型")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string ClaimType { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("值")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string ClaimValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(nameof(UserId))]
|
||||||
|
public virtual AspNetUsers AspNetUsers { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
39
Examples/base_entity/AspNetRoleClaims/AspNetUserLogins.cs
Normal file
39
Examples/base_entity/AspNetRoleClaims/AspNetUserLogins.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.ComponentModel;
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Densen.Models.ids
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户登录
|
||||||
|
/// </summary>
|
||||||
|
[JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
|
||||||
|
public partial class AspNetUserLogins
|
||||||
|
{
|
||||||
|
|
||||||
|
[DisplayName("外联登录")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsPrimary = true, IsNullable = false)]
|
||||||
|
public string LoginProvider { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("用户ID")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string UserId { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("外联Key")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string ProviderKey { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("外联名称")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string ProviderDisplayName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户
|
||||||
|
/// </summary>
|
||||||
|
[Navigate(nameof(UserId))]
|
||||||
|
public virtual AspNetUsers AspNetUsers { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
45
Examples/base_entity/AspNetRoleClaims/AspNetUserRoles.cs
Normal file
45
Examples/base_entity/AspNetRoleClaims/AspNetUserRoles.cs
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.ComponentModel;
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Densen.Models.ids
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 角色表
|
||||||
|
/// <para>存储向哪些用户分配哪些角色</para>
|
||||||
|
/// </summary>
|
||||||
|
[JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
|
||||||
|
public partial class AspNetUserRoles
|
||||||
|
{
|
||||||
|
|
||||||
|
[DisplayName("用户ID")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsPrimary = true, IsNullable = false)]
|
||||||
|
public string UserId { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty, Column(IsIgnore = true)]
|
||||||
|
[DisplayName("用户")]
|
||||||
|
public string UserName { get => roleName ?? (AspNetUserss?.UserName); set => userName = value; }
|
||||||
|
string userName;
|
||||||
|
|
||||||
|
[DisplayName("角色ID")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string RoleId { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty, Column(IsIgnore = true)]
|
||||||
|
[DisplayName("角色名称")]
|
||||||
|
public string RoleName { get => roleName ?? (AspNetRoless?.Name); set => roleName = value; }
|
||||||
|
string roleName;
|
||||||
|
|
||||||
|
[DisplayName("角色定义")]
|
||||||
|
[Navigate(nameof(RoleId))]
|
||||||
|
public virtual AspNetRoles AspNetRoless { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("用户表")]
|
||||||
|
[Navigate(nameof(UserId))]
|
||||||
|
public virtual AspNetUsers AspNetUserss { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
36
Examples/base_entity/AspNetRoleClaims/AspNetUserTokens.cs
Normal file
36
Examples/base_entity/AspNetRoleClaims/AspNetUserTokens.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.ComponentModel;
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Densen.Models.ids
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户令牌
|
||||||
|
/// </summary>
|
||||||
|
[JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
|
||||||
|
public partial class AspNetUserTokens
|
||||||
|
{
|
||||||
|
|
||||||
|
[DisplayName("用户ID")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsPrimary = true, IsNullable = false)]
|
||||||
|
public string UserId { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("名称")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("外部登录提供程序")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string LoginProvider { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("值")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string Value { get; set; }
|
||||||
|
|
||||||
|
[Navigate(nameof(UserId))]
|
||||||
|
public virtual AspNetUsers AspNetUsers { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
149
Examples/base_entity/AspNetRoleClaims/AspNetUsers.cs
Normal file
149
Examples/base_entity/AspNetRoleClaims/AspNetUsers.cs
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Densen.Models.ids
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户表
|
||||||
|
/// </summary>
|
||||||
|
[JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
|
||||||
|
public partial class AspNetUsers
|
||||||
|
{
|
||||||
|
|
||||||
|
[DisplayName("用户ID")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsPrimary = true, IsNullable = false)]
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
[DisplayName("用户名")]
|
||||||
|
public string UserName { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty, Column(IsIgnore = true)]
|
||||||
|
[DisplayName("角色")]
|
||||||
|
public string RoleName { get => roleName ?? (AspNetUserRoless != null ? string.Join(",", AspNetUserRoless?.Select(a => a.RoleName ?? a.RoleId).ToList()) : ""); set => roleName = value; }
|
||||||
|
string roleName;
|
||||||
|
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string Email { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("电话")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string PhoneNumber { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("自定义名称")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("自定义角色")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string UserRole { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("密码哈希")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string PasswordHash { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("电子邮件已确认")]
|
||||||
|
[JsonProperty]
|
||||||
|
public int EmailConfirmed { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("电话号码已确认")]
|
||||||
|
[JsonProperty]
|
||||||
|
public int PhoneNumberConfirmed { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("锁定结束")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string LockoutEnd { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("启用双因素登录")]
|
||||||
|
[JsonProperty]
|
||||||
|
public int TwoFactorEnabled { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("并发票据")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string ConcurrencyStamp { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("防伪印章")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string SecurityStamp { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("标准化电子邮件")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string NormalizedEmail { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("标准化用户名")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string NormalizedUserName { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("启用锁定")]
|
||||||
|
[JsonProperty]
|
||||||
|
public int LockoutEnabled { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("国家")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string Country { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("省")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string Province { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("城市")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string City { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("县")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string County { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("邮编")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string Zip { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("街道")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string Street { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("税号")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string TaxNumber { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("提供者")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string provider { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("UUID")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string UUID { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("生日")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string DOB { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("访问失败次数")]
|
||||||
|
[JsonProperty]
|
||||||
|
public int AccessFailedCount { get; set; }
|
||||||
|
|
||||||
|
//导航属性
|
||||||
|
[Navigate(nameof(AspNetUserRoles.UserId))]
|
||||||
|
[DisplayName("角色表")]
|
||||||
|
public virtual List<AspNetUserRoles> AspNetUserRoless { get; set; }
|
||||||
|
|
||||||
|
[Navigate(nameof(AspNetUserClaims.UserId))]
|
||||||
|
[DisplayName("用户声明")]
|
||||||
|
public virtual List<AspNetUserClaims> AspNetUserClaimss { get; set; }
|
||||||
|
|
||||||
|
[Navigate(nameof(AspNetUserLogins.UserId))]
|
||||||
|
[DisplayName("用户登录")]
|
||||||
|
public virtual List<AspNetUserLogins> AspNetUserLoginss { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty, Column(IsIgnore = true)]
|
||||||
|
[DisplayName("1st角色")]
|
||||||
|
public string RoleName1st { get => roleName1st ?? ((AspNetUserRoless != null && AspNetUserRoless.Any()) ? AspNetUserRoless?.Select(a => a.RoleName ?? a.RoleId ?? "").First() : ""); set => roleName1st = value; }
|
||||||
|
string roleName1st;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
53
Examples/base_entity/AspNetRoleClaims/DeviceCodes.cs
Normal file
53
Examples/base_entity/AspNetRoleClaims/DeviceCodes.cs
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Densen.Models.ids
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 设备代码
|
||||||
|
/// </summary>
|
||||||
|
[JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
|
||||||
|
public partial class DeviceCodes
|
||||||
|
{
|
||||||
|
|
||||||
|
[Display(Name = "用户代码")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsPrimary = true, IsNullable = false)]
|
||||||
|
public string UserCode { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "设备代码")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string DeviceCode { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "主题编号")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string SubjectId { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "会话编号")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string SessionId { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "客户编号")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string ClientId { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "描述")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "创建时间")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string CreationTime { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "到期")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string Expiration { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("数据")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string Data { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
49
Examples/base_entity/AspNetRoleClaims/Keys.cs
Normal file
49
Examples/base_entity/AspNetRoleClaims/Keys.cs
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.ComponentModel;
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Densen.Models.ids
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 密钥
|
||||||
|
/// </summary>
|
||||||
|
[JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
|
||||||
|
public partial class Keys
|
||||||
|
{
|
||||||
|
|
||||||
|
[DisplayName("ID")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsPrimary = true, IsNullable = false)]
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("版本")]
|
||||||
|
[JsonProperty]
|
||||||
|
public int Version { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("创建")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string Created { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("使用")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string Use { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("算法")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string Algorithm { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("是X509证书")]
|
||||||
|
[JsonProperty]
|
||||||
|
public int IsX509Certificate { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("数据保护")]
|
||||||
|
[JsonProperty]
|
||||||
|
public int DataProtected { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("数据")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string Data { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
57
Examples/base_entity/AspNetRoleClaims/PersistedGrants.cs
Normal file
57
Examples/base_entity/AspNetRoleClaims/PersistedGrants.cs
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
using FreeSql.DataAnnotations;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using System.ComponentModel;
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Densen.Models.ids
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 持久化保存
|
||||||
|
/// </summary>
|
||||||
|
[JsonObject(MemberSerialization.OptIn), Table(DisableSyncStructure = true)]
|
||||||
|
public partial class PersistedGrants
|
||||||
|
{
|
||||||
|
|
||||||
|
[DisplayName("键值")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsPrimary = true, IsNullable = false)]
|
||||||
|
public string Key { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("类型")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string Type { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("主题编号")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string SubjectId { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("会话编号")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string SessionId { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("客户编号")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string ClientId { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("描述")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("创建时间")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string CreationTime { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("到期")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string Expiration { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("消耗时间")]
|
||||||
|
[JsonProperty, Column(StringLength = -2)]
|
||||||
|
public string ConsumedTime { get; set; }
|
||||||
|
|
||||||
|
[DisplayName("数据")]
|
||||||
|
[JsonProperty, Column(StringLength = -2, IsNullable = false)]
|
||||||
|
public string Data { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
53
Examples/base_entity/AspNetRoleClaims/WebAppIdentityUser.cs
Normal file
53
Examples/base_entity/AspNetRoleClaims/WebAppIdentityUser.cs
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Densen.Identity.Models
|
||||||
|
{
|
||||||
|
|
||||||
|
public class WebAppIdentityUser
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Full name
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "全名")]
|
||||||
|
public string? Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Birth Date
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "生日")]
|
||||||
|
public DateTime? DOB { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "识别码")]
|
||||||
|
public string? UUID { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "外联")]
|
||||||
|
public string? provider { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "税号")]
|
||||||
|
public string? TaxNumber { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "街道地址")]
|
||||||
|
public string? Street { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "邮编")]
|
||||||
|
public string? Zip { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "县")]
|
||||||
|
public string? County { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "城市")]
|
||||||
|
public string? City { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "省份")]
|
||||||
|
public string? Province { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "国家")]
|
||||||
|
public string? Country { get; set; }
|
||||||
|
|
||||||
|
[Display(Name = "类型")]
|
||||||
|
public string? UserRole { get; set; }
|
||||||
|
}
|
||||||
|
}
|
BIN
Examples/base_entity/AspNetRoleClaims/ids_api.db
Normal file
BIN
Examples/base_entity/AspNetRoleClaims/ids_api.db
Normal file
Binary file not shown.
@ -1,4 +1,5 @@
|
|||||||
using FreeSql;
|
using Densen.Models.ids;
|
||||||
|
using FreeSql;
|
||||||
using FreeSql.DataAnnotations;
|
using FreeSql.DataAnnotations;
|
||||||
using FreeSql.Extensions;
|
using FreeSql.Extensions;
|
||||||
using FreeSql.Internal;
|
using FreeSql.Internal;
|
||||||
@ -524,17 +525,18 @@ namespace base_entity
|
|||||||
|
|
||||||
|
|
||||||
.UseConnectionString(FreeSql.DataType.Sqlite, "data source=:memory:")
|
.UseConnectionString(FreeSql.DataType.Sqlite, "data source=:memory:")
|
||||||
|
.UseConnectionString(DataType.Sqlite, "data source=C:\\Users\\28810\\Desktop\\github\\FreeSql\\Examples\\base_entity\\AspNetRoleClaims\\ids_api.db")
|
||||||
//.UseConnectionString(DataType.Sqlite, "data source=db1.db;attachs=db2.db")
|
//.UseConnectionString(DataType.Sqlite, "data source=db1.db;attachs=db2.db")
|
||||||
//.UseSlave("data source=test1.db", "data source=test2.db", "data source=test3.db", "data source=test4.db")
|
//.UseSlave("data source=test1.db", "data source=test2.db", "data source=test3.db", "data source=test4.db")
|
||||||
//.UseSlaveWeight(10, 1, 1, 5)
|
//.UseSlaveWeight(10, 1, 1, 5)
|
||||||
|
|
||||||
|
|
||||||
.UseConnectionString(FreeSql.DataType.Firebird, @"database=localhost:D:\fbdata\EXAMPLES.fdb;user=sysdba;password=123456;max pool size=5")
|
//.UseConnectionString(FreeSql.DataType.Firebird, @"database=localhost:D:\fbdata\EXAMPLES.fdb;user=sysdba;password=123456;max pool size=5")
|
||||||
//.UseQuoteSqlName(false)
|
//.UseQuoteSqlName(false)
|
||||||
|
|
||||||
//.UseConnectionString(FreeSql.DataType.MySql, "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=cccddd;Charset=utf8;SslMode=none;min pool size=1;Max pool size=2")
|
//.UseConnectionString(FreeSql.DataType.MySql, "Data Source=127.0.0.1;Port=3306;User ID=root;Password=root;Initial Catalog=cccddd;Charset=utf8;SslMode=none;min pool size=1;Max pool size=2")
|
||||||
|
|
||||||
.UseConnectionString(FreeSql.DataType.SqlServer, "Data Source=.;Integrated Security=True;Initial Catalog=freesqlTest;Pooling=true;Max Pool Size=3;TrustServerCertificate=true")
|
//.UseConnectionString(FreeSql.DataType.SqlServer, "Data Source=.;Integrated Security=True;Initial Catalog=freesqlTest;Pooling=true;Max Pool Size=3;TrustServerCertificate=true")
|
||||||
|
|
||||||
//.UseConnectionString(FreeSql.DataType.PostgreSQL, "Host=192.168.164.10;Port=5432;Username=postgres;Password=123456;Database=tedb;Pooling=true;Maximum Pool Size=2")
|
//.UseConnectionString(FreeSql.DataType.PostgreSQL, "Host=192.168.164.10;Port=5432;Username=postgres;Password=123456;Database=tedb;Pooling=true;Maximum Pool Size=2")
|
||||||
//.UseConnectionString(FreeSql.DataType.PostgreSQL, "Host=192.168.164.10;Port=5432;Username=postgres;Password=123456;Database=toc;Pooling=true;Maximum Pool Size=2")
|
//.UseConnectionString(FreeSql.DataType.PostgreSQL, "Host=192.168.164.10;Port=5432;Username=postgres;Password=123456;Database=toc;Pooling=true;Maximum Pool Size=2")
|
||||||
@ -570,6 +572,11 @@ namespace base_entity
|
|||||||
#endregion
|
#endregion
|
||||||
fsql.UseJsonMap();
|
fsql.UseJsonMap();
|
||||||
|
|
||||||
|
var dywhere = new DynamicFilterInfo { Field = "AspNetRoless.Name", Operator = DynamicFilterOperator.Equal, Value = "Admin" };
|
||||||
|
var method = typeof(ISelect<object>).GetMethod("WhereDynamicFilter");
|
||||||
|
var users4 = fsql.Select<AspNetUsers>().IncludeByPropertyName("AspNetUserRoless", then => then.WhereDynamicFilter(dywhere)).ToList();
|
||||||
|
|
||||||
|
|
||||||
var type = typeof(Student);
|
var type = typeof(Student);
|
||||||
|
|
||||||
var sw111 = fsql.Queryable<object>()
|
var sw111 = fsql.Queryable<object>()
|
||||||
|
@ -4,6 +4,77 @@
|
|||||||
<name>base_entity</name>
|
<name>base_entity</name>
|
||||||
</assembly>
|
</assembly>
|
||||||
<members>
|
<members>
|
||||||
|
<member name="T:Densen.Models.ids.AspNetRoleClaims">
|
||||||
|
<summary>
|
||||||
|
角色声明
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Densen.Models.ids.AspNetRoles">
|
||||||
|
<summary>
|
||||||
|
角色定义
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Densen.Models.ids.AspNetUserClaims">
|
||||||
|
<summary>
|
||||||
|
用户声明
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Densen.Models.ids.AspNetUserClaims.AspNetUsers">
|
||||||
|
<summary>
|
||||||
|
用户
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Densen.Models.ids.AspNetUserLogins">
|
||||||
|
<summary>
|
||||||
|
用户登录
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Densen.Models.ids.AspNetUserLogins.AspNetUsers">
|
||||||
|
<summary>
|
||||||
|
用户
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Densen.Models.ids.AspNetUserRoles">
|
||||||
|
<summary>
|
||||||
|
角色表
|
||||||
|
<para>存储向哪些用户分配哪些角色</para>
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Densen.Models.ids.AspNetUsers">
|
||||||
|
<summary>
|
||||||
|
用户表
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Densen.Models.ids.AspNetUserTokens">
|
||||||
|
<summary>
|
||||||
|
用户令牌
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Densen.Models.ids.DeviceCodes">
|
||||||
|
<summary>
|
||||||
|
设备代码
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Densen.Models.ids.Keys">
|
||||||
|
<summary>
|
||||||
|
密钥
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Densen.Models.ids.PersistedGrants">
|
||||||
|
<summary>
|
||||||
|
持久化保存
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Densen.Identity.Models.WebAppIdentityUser.Name">
|
||||||
|
<summary>
|
||||||
|
Full name
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Densen.Identity.Models.WebAppIdentityUser.DOB">
|
||||||
|
<summary>
|
||||||
|
Birth Date
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:UserGroup.GroupName">
|
<member name="P:UserGroup.GroupName">
|
||||||
<summary>
|
<summary>
|
||||||
组名
|
组名
|
||||||
|
@ -561,6 +561,14 @@ namespace FreeSql.Internal.CommonProvider
|
|||||||
{
|
{
|
||||||
var methodParameterTypes = node.Method.GetParameters().Select(a => a.ParameterType).ToArray();
|
var methodParameterTypes = node.Method.GetParameters().Select(a => a.ParameterType).ToArray();
|
||||||
var method = _replaceExp.Type.GetMethod(node.Method.Name, methodParameterTypes);
|
var method = _replaceExp.Type.GetMethod(node.Method.Name, methodParameterTypes);
|
||||||
|
if (method == null && _replaceExp.Type.IsInterface)
|
||||||
|
{
|
||||||
|
foreach (var baseInterface in _replaceExp.Type.GetInterfaces())
|
||||||
|
{
|
||||||
|
method = baseInterface.GetMethod(node.Method.Name, methodParameterTypes);
|
||||||
|
if (method != null) break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (node.Object?.NodeType == ExpressionType.Parameter && node.Object == oldParameter)
|
if (node.Object?.NodeType == ExpressionType.Parameter && node.Object == oldParameter)
|
||||||
return Expression.Call(_replaceExp, method, node.Arguments);
|
return Expression.Call(_replaceExp, method, node.Arguments);
|
||||||
return Expression.Call(Visit(node.Object), method, node.Arguments);
|
return Expression.Call(Visit(node.Object), method, node.Arguments);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user