mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 09:15:27 +08:00 
			
		
		
		
	update readme
This commit is contained in:
		@@ -344,9 +344,17 @@ namespace FreeSql.Tests
 | 
				
			|||||||
            public bool IsLeaf { get; set; }
 | 
					            public bool IsLeaf { get; set; }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        public static int GetUNIX_TIMESTAMP() => 0;
 | 
				
			||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void Test1()
 | 
					        public void Test1()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					            g.mysql.Aop.ParseExpression += new EventHandler<Aop.ParseExpressionEventArgs>((s, e) =>
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                if (e.Expression.NodeType == ExpressionType.Call && (e.Expression as MethodCallExpression).Method.Name == "GetUNIX_TIMESTAMP")
 | 
				
			||||||
 | 
					                    e.Result = "UNIX_TIMESTAMP(NOW())";
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					            var dkkdksdjgj = g.mysql.Select<TaskBuild>().Where(a => a.OptionsEntity04 > GetUNIX_TIMESTAMP()).ToSql();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var kdkdfm = g.sqlite.Select<AnswerQuestionnaire>()
 | 
					            var kdkdfm = g.sqlite.Select<AnswerQuestionnaire>()
 | 
				
			||||||
                .Include(a => a.MedicalRecord)
 | 
					                .Include(a => a.MedicalRecord)
 | 
				
			||||||
                .ToSql();
 | 
					                .ToSql();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -65,7 +65,7 @@ IFreeSql fsql = new FreeSql.FreeSqlBuilder()
 | 
				
			|||||||
    .UseConnectionString(FreeSql.DataType.Sqlite, 
 | 
					    .UseConnectionString(FreeSql.DataType.Sqlite, 
 | 
				
			||||||
        @"Data Source=|DataDirectory|\document.db;Pooling=true;Max Pool Size=10")
 | 
					        @"Data Source=|DataDirectory|\document.db;Pooling=true;Max Pool Size=10")
 | 
				
			||||||
    .UseAutoSyncStructure(true) //自动同步实体结构到数据库
 | 
					    .UseAutoSyncStructure(true) //自动同步实体结构到数据库
 | 
				
			||||||
    .Build();
 | 
					    .Build(); //请务必定义成 Singleton 单例模式
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Song {
 | 
					class Song {
 | 
				
			||||||
    [Column(IsIdentity = true)]
 | 
					    [Column(IsIdentity = true)]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user