1、根据数据表,删除表数据接口迁移至DataModel 已有接口下
2、将根据表明生成实体类,代码迁移至已有数据接口DataModel下
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using JNPF.DependencyInjection;
|
||||
|
||||
namespace JNPF.Systems.Entitys.Dto.Database
|
||||
{
|
||||
/// <summary>
|
||||
/// 清除表数据输入参数
|
||||
/// </summary>
|
||||
[SuppressSniffer]
|
||||
public class DatabaseTableDataCleanInput
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 数据库名称
|
||||
/// </summary>
|
||||
public string DbName { get; set; }
|
||||
/// <summary>
|
||||
/// 表名称
|
||||
/// </summary>
|
||||
public string TableName { get; set; }
|
||||
}
|
||||
}
|
||||
24
system/Tnb.Systems.Entitys/Mapper/ConnectionMapper.cs
Normal file
24
system/Tnb.Systems.Entitys/Mapper/ConnectionMapper.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Mapster;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Tnb.Systems.Entitys.Mapper
|
||||
{
|
||||
public class ConnectionMapper : IRegister
|
||||
{
|
||||
public void Register(TypeAdapterConfig config)
|
||||
{
|
||||
config.ForType<ConnectionStringsOptions, ConnectionConfig>()
|
||||
.Map(dest => dest.ConnectionString, src => src.DefaultConnection)
|
||||
.AfterMapping((src, dest) =>
|
||||
{
|
||||
dest.ConnectionString = string.Format(src.DefaultConnection, src.Host, src.Port, src.DBName, src.UserName, src.Password);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user