mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-06-23 00:52:07 +08:00
🔄refactor: 调整为SqlSugar
This commit is contained in:
@@ -1,25 +1,24 @@
|
||||
using System;
|
||||
using OpenAuth.Repository;
|
||||
using OpenAuth.Repository.Domain;
|
||||
using OpenAuth.Repository.Interface;
|
||||
using Infrastructure;
|
||||
using SqlSugar;
|
||||
|
||||
namespace OpenAuth.App
|
||||
{
|
||||
public class FormFactory
|
||||
{
|
||||
public static IForm CreateForm(Form form, IUnitWork<OpenAuthDBContext> unitWork)
|
||||
public static IForm CreateForm(Form form, ISqlSugarClient sugarClient)
|
||||
{
|
||||
if (form.FrmType == Define.FORM_TYPE_DYNAMIC)
|
||||
{
|
||||
return new LeipiForm(unitWork);
|
||||
return new LeipiForm(sugarClient);
|
||||
}else if (form.FrmType == Define.FORM_TYPE_DEVELOP)
|
||||
{
|
||||
throw new Exception("自定义表单不需要创建数据库表");
|
||||
}
|
||||
else
|
||||
{
|
||||
return new DragForm(unitWork);
|
||||
return new DragForm(sugarClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user