SqlSugar/Src/Asp.NetCore2/MongoDb.Ado.data/Common/MongoDbMethodUtils.cs

24 lines
638 B
C#
Raw Normal View History

2025-05-02 16:55:48 +08:00
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace MongoDb.Ado.data
{
public class MongoDbMethodUtils
{
2025-05-02 17:00:36 +08:00
public static void ValidateOperation(string operation)
2025-05-02 16:55:48 +08:00
{
if (ExecuteHandlerFactory.Items.TryGetValue(operation, out var handler))
{
return ;
}
if (DbDataReaderFactory.Items.TryGetValue(operation, out var handlerQuery))
{
return;
}
throw new InvalidOperationException($"Operation '{operation}' is not supported.");
}
}
}