mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 增加 Navigate 属性未设置 set 时的友好错误提示;
- 增加 延时属性重写类对 protected set 的支持;
This commit is contained in:
		
							
								
								
									
										36
									
								
								Examples/base_entity/Test01/UserRole.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								Examples/base_entity/Test01/UserRole.cs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
using Newtonsoft.Json;
 | 
			
		||||
using FreeSql.DataAnnotations;
 | 
			
		||||
using FreeSql;
 | 
			
		||||
 | 
			
		||||
namespace EMSServerModel.Model
 | 
			
		||||
{
 | 
			
		||||
	/// <summary>
 | 
			
		||||
	/// <20>û<EFBFBD><C3BB><EFBFBD>ɫ<EFBFBD><C9AB>ϵ<EFBFBD><CFB5>
 | 
			
		||||
	/// </summary>
 | 
			
		||||
	[JsonObject(MemberSerialization.OptIn)]
 | 
			
		||||
	public partial class UserRole : BaseEntity<UserRole>{
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// <20><>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		[JsonProperty]
 | 
			
		||||
		public long RoleId { get; set; }
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// <20><>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		[Navigate("RoleId")]
 | 
			
		||||
		public Role Roles { get; set; }
 | 
			
		||||
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// <20>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		[JsonProperty, Column(DbType = "varchar(50)")]
 | 
			
		||||
		public string UserId { get; set; }
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// <20>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		[Navigate("UserId")]
 | 
			
		||||
		public User Users { get; set; }
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user