mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-21 02:57:54 +08:00
增加对sql只返回string的支持;
修复添加表单时,如果关联的数据库已存在的bug
This commit is contained in:
25
OpenAuth.App/Form/FormFactory.cs
Normal file
25
OpenAuth.App/Form/FormFactory.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using OpenAuth.Repository;
|
||||
using OpenAuth.Repository.Domain;
|
||||
using OpenAuth.Repository.Interface;
|
||||
|
||||
namespace OpenAuth.App
|
||||
{
|
||||
public class FormFactory
|
||||
{
|
||||
public static IForm CreateForm(Form form, IUnitWork<OpenAuthDBContext> unitWork)
|
||||
{
|
||||
if (form.FrmType == 0)
|
||||
{
|
||||
return new LeipiForm(unitWork);
|
||||
}else if (form.FrmType == 1)
|
||||
{
|
||||
throw new Exception("自定义表单不需要创建数据库表");
|
||||
}
|
||||
else
|
||||
{
|
||||
return new DragForm(unitWork);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user