refactor:删除不必要的方法
This commit is contained in:
@@ -146,7 +146,12 @@ namespace DMS.Application.Services.Database
|
||||
try
|
||||
{
|
||||
await _repositoryManager.BeginTranAsync();
|
||||
var delRes = await _repositoryManager.VariableTables.DeleteByIdAsync(id);
|
||||
var variableTable = await _repositoryManager.VariableTables.GetByIdAsync(id);
|
||||
if (variableTable == null)
|
||||
{
|
||||
throw new InvalidOperationException($"删除变量表失败:变量表ID:{id},请检查变量表Id是否存在");
|
||||
}
|
||||
var delRes = await _repositoryManager.VariableTables.DeleteAsync(variableTable);
|
||||
if (delRes == 0)
|
||||
{
|
||||
throw new InvalidOperationException($"删除变量表失败:变量表ID:{id},请检查变量表Id是否存在");
|
||||
|
||||
Reference in New Issue
Block a user