mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-06 13:47:59 +08:00
30 lines
819 B
C#
30 lines
819 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace OrmTest
|
|
{
|
|
internal class _2_DbFirst
|
|
{
|
|
public static void Init()
|
|
{
|
|
var db = DbHelper.GetNewDb();
|
|
|
|
db.DbFirst.CreateClassFile("c:\\Demo\\1", "Models");
|
|
|
|
db.DbFirst.IsCreateAttribute().CreateClassFile("c:\\Demo\\2", "Models");
|
|
|
|
db.DbFirst.StringNullable().IsCreateAttribute().CreateClassFile("c:\\Demo\\3", "Models");
|
|
|
|
db.DbFirst
|
|
.IsCreateAttribute()
|
|
.FormatFileName(it => "File_"+it)
|
|
.FormatClassName(it=> "Class_"+it)
|
|
.FormatPropertyName(it=> "Property_" + it )
|
|
.CreateClassFile("c:\\Demo\\4", "Models");
|
|
}
|
|
}
|
|
}
|