You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
832 B
31 lines
832 B
6 years ago
|
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\\");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|