mirror of
				https://gitee.com/dotnetchina/SqlSugar.git
				synced 2025-10-31 08:26:51 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			31 lines
		
	
	
		
			832 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			832 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using SqlSugar;
 | |
| using SqlSugar.DbFirstExtensions;
 | |
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.Linq;
 | |
| using System.Text;
 | |
| using System.Threading.Tasks;
 | |
| 
 | |
| namespace ExtensionsDemo
 | |
| {
 | |
|     public class DbFirstDemo
 | |
|     {
 | |
|         public static void Init()
 | |
|         {
 | |
|             SqlSugarClient db = new SqlSugarClient(new ConnectionConfig()
 | |
|             {
 | |
|                 ConnectionString = Config.ConnectionString,
 | |
|                 DbType = DbType.SqlServer,
 | |
|                 IsAutoCloseConnection = true,
 | |
|                 ConfigureExternalServices = new ConfigureExternalServices()
 | |
|                 {
 | |
|                     RazorService = new RazorService()
 | |
|                 }
 | |
|             });
 | |
|  
 | |
|             db.DbFirst.UseRazorAnalysis(RazorFirst.DefaultRazorClassTemplate).CreateClassFile("c:\\Demo\\Razor\\");
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | 
