From f6448ddd0a30119420ed6850d38c9822a75aaf0c Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Thu, 16 Apr 2026 11:00:16 -0500 Subject: [PATCH 1/2] add graph db methods --- .../BotSharp.Abstraction/Graph/IGraphDb.cs | 29 ++++++ .../Graph/Models/GraphEdgeModel.cs | 15 ++++ .../Graph/Models/GraphNodeModel.cs | 9 ++ .../Requests/GraphEdgeCreationRequest.cs | 12 +++ .../Graph/Requests/GraphEdgeUpdateRequest.cs | 7 ++ .../Requests/GraphNodeCreationRequest.cs | 9 ++ .../Graph/Requests/GraphNodeUpdateRequest.cs | 9 ++ .../Controllers/MembaseController.cs | 52 +++++++++-- .../GraphDb/MembaseGraphDb.cs | 90 +++++++++++++++++-- .../Models/Graph/Edge.cs | 19 ++++ .../Models/Graph/Node.cs | 11 +++ .../Models/Requests/EdgeCreationModel.cs | 2 +- .../Models/Requests/EdgeUpdateModel.cs | 2 +- .../Models/Requests/NodeCreationModel.cs | 2 +- .../Models/Requests/NodeUpdateModel.cs | 2 +- .../Services/MembaseService.cs | 52 ----------- src/Plugins/BotSharp.Plugin.Membase/Using.cs | 1 + 17 files changed, 253 insertions(+), 70 deletions(-) create mode 100644 src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphEdgeModel.cs create mode 100644 src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphNodeModel.cs create mode 100644 src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeCreationRequest.cs create mode 100644 src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeUpdateRequest.cs create mode 100644 src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeCreationRequest.cs create mode 100644 src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeUpdateRequest.cs delete mode 100644 src/Plugins/BotSharp.Plugin.Membase/Services/MembaseService.cs diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/IGraphDb.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/IGraphDb.cs index 785be11e5..3c3dcbf78 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Graph/IGraphDb.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Graph/IGraphDb.cs @@ -1,5 +1,6 @@ using BotSharp.Abstraction.Graph.Models; using BotSharp.Abstraction.Graph.Options; +using BotSharp.Abstraction.Graph.Requests; namespace BotSharp.Abstraction.Graph; @@ -9,4 +10,32 @@ public interface IGraphDb Task ExecuteQueryAsync(string query, GraphQueryExecuteOptions? options = null) => throw new NotImplementedException(); + + #region Node + Task GetNodeAsync(string graphId, string nodeId) + => throw new NotImplementedException(); + + Task CreateNodeAsync(string graphId, GraphNodeCreationRequest request) + => throw new NotImplementedException(); + + Task MergeNodeAsync(string graphId, string nodeId, GraphNodeUpdateRequest request) + => throw new NotImplementedException(); + + Task DeleteNodeAsync(string graphId, string nodeId) + => throw new NotImplementedException(); + #endregion + + #region Edge + Task GetEdgeAsync(string graphId, string edgeId) + => throw new NotImplementedException(); + + Task CreateEdgeAsync(string graphId, GraphEdgeCreationRequest request) + => throw new NotImplementedException(); + + Task UpdateEdgeAsync(string graphId, string edgeId, GraphEdgeUpdateRequest request) + => throw new NotImplementedException(); + + Task DeleteEdgeAsync(string graphId, string edgeId) + => throw new NotImplementedException(); + #endregion } diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphEdgeModel.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphEdgeModel.cs new file mode 100644 index 000000000..65858e954 --- /dev/null +++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphEdgeModel.cs @@ -0,0 +1,15 @@ +namespace BotSharp.Abstraction.Graph.Models; + +public class GraphEdgeModel +{ + public string Id { get; set; } = string.Empty; + public string SourceNodeId { get; set; } = string.Empty; + public string TargetNodeId { get; set; } = string.Empty; + public string Type { get; set; } = string.Empty; + public object? Properties { get; set; } + public string? Direction { get; set; } + public bool? Directed { get; set; } + public float? Weight { get; set; } + public DateTime? CreatedAt { get; set; } + public DateTime? UpdatedAt { get; set; } +} diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphNodeModel.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphNodeModel.cs new file mode 100644 index 000000000..ad18ee4d7 --- /dev/null +++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Models/GraphNodeModel.cs @@ -0,0 +1,9 @@ +namespace BotSharp.Abstraction.Graph.Models; + +public class GraphNodeModel +{ + public string Id { get; set; } = string.Empty; + public List Labels { get; set; } = new(); + public object Properties { get; set; } = new(); + public DateTime? Time { get; set; } = DateTime.UtcNow; +} diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeCreationRequest.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeCreationRequest.cs new file mode 100644 index 000000000..abbda387d --- /dev/null +++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeCreationRequest.cs @@ -0,0 +1,12 @@ +namespace BotSharp.Abstraction.Graph.Requests; + +public class GraphEdgeCreationRequest +{ + public string? Id { get; set; } + public string SourceNodeId { get; set; } = null!; + public string TargetNodeId { get; set; } = null!; + public string Type { get; set; } = null!; + public bool Directed { get; set; } = true; + public float? Weight { get; set; } = 1.0f; + public Dictionary? Properties { get; set; } +} diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeUpdateRequest.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeUpdateRequest.cs new file mode 100644 index 000000000..090205f5e --- /dev/null +++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphEdgeUpdateRequest.cs @@ -0,0 +1,7 @@ +namespace BotSharp.Abstraction.Graph.Requests; + +public class GraphEdgeUpdateRequest +{ + public string Id { get; set; } = null!; + public Dictionary? Properties { get; set; } +} diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeCreationRequest.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeCreationRequest.cs new file mode 100644 index 000000000..b292426b7 --- /dev/null +++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeCreationRequest.cs @@ -0,0 +1,9 @@ +namespace BotSharp.Abstraction.Graph.Requests; + +public class GraphNodeCreationRequest +{ + public string? Id { get; set; } + public string[]? Labels { get; set; } + public Dictionary? Properties { get; set; } + public DateTime? Time { get; set; } +} diff --git a/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeUpdateRequest.cs b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeUpdateRequest.cs new file mode 100644 index 000000000..4b76bcbc2 --- /dev/null +++ b/src/Infrastructure/BotSharp.Abstraction/Graph/Requests/GraphNodeUpdateRequest.cs @@ -0,0 +1,9 @@ +namespace BotSharp.Abstraction.Graph.Requests; + +public class GraphNodeUpdateRequest +{ + public string Id { get; set; } = null!; + public string[]? Labels { get; set; } + public Dictionary? Properties { get; set; } + public DateTime? Time { get; set; } +} diff --git a/src/Plugins/BotSharp.Plugin.Membase/Controllers/MembaseController.cs b/src/Plugins/BotSharp.Plugin.Membase/Controllers/MembaseController.cs index 52f3968dd..6a057f5e5 100644 --- a/src/Plugins/BotSharp.Plugin.Membase/Controllers/MembaseController.cs +++ b/src/Plugins/BotSharp.Plugin.Membase/Controllers/MembaseController.cs @@ -8,6 +8,7 @@ namespace BotSharp.Plugin.Membase.Controllers; [ApiController] public class MembaseController : ControllerBase { + private const string GraphDbProvider = "membase"; private readonly IServiceProvider _services; private readonly IMembaseApi _membaseApi; @@ -78,7 +79,7 @@ public async Task ExecuteGraphQuery(string graphId, [FromBody] Cy try { - var graph = _services.GetServices().First(x => x.Provider == "membase"); + var graph = _services.GetServices().First(x => x.Provider == GraphDbProvider); var result = await graph.ExecuteQueryAsync(query: request.Query, options: new() { GraphId = graphId, @@ -125,7 +126,8 @@ public async Task GetNode(string graphId, string nodeId) try { - var node = await _membaseApi.GetNodeAsync(graphId, nodeId); + var graph = _services.GetServices().First(x => x.Provider == GraphDbProvider); + var node = await graph.GetNodeAsync(graphId, nodeId); return Ok(node); } catch (Exception ex) @@ -163,7 +165,14 @@ public async Task CreateNode(string graphId, [FromBody] NodeCreat try { - var node = await _membaseApi.CreateNodeAsync(graphId, request); + var graph = _services.GetServices().First(x => x.Provider == GraphDbProvider); + var node = await graph.CreateNodeAsync(graphId, new GraphNodeCreationRequest + { + Id = request.Id, + Labels = request.Labels, + Properties = request.Properties, + Time = request.Time + }); return Ok(node); } catch (Exception ex) @@ -201,7 +210,14 @@ public async Task MergeNode(string graphId, [FromBody] NodeUpdate try { - var node = await _membaseApi.MergeNodeAsync(graphId, request.Id, request); + var graph = _services.GetServices().First(x => x.Provider == GraphDbProvider); + var node = await graph.MergeNodeAsync(graphId, request.Id, new GraphNodeUpdateRequest + { + Id = request.Id, + Labels = request.Labels, + Properties = request.Properties, + Time = request.Time + }); return Ok(node); } catch (Exception ex) @@ -239,7 +255,8 @@ public async Task DeleteNode(string graphId, string nodeId) try { - await _membaseApi.DeleteNodeAsync(graphId, nodeId); + var graph = _services.GetServices().First(x => x.Provider == GraphDbProvider); + await graph.DeleteNodeAsync(graphId, nodeId); return Ok("done"); } catch (Exception ex) @@ -277,7 +294,8 @@ public async Task GetEdge(string graphId, string edgeId) try { - var edge = await _membaseApi.GetEdgeAsync(graphId, edgeId); + var graph = _services.GetServices().First(x => x.Provider == GraphDbProvider); + var edge = await graph.GetEdgeAsync(graphId, edgeId); return Ok(edge); } catch (Exception ex) @@ -330,7 +348,17 @@ public async Task CreateEdge(string graphId, [FromBody] EdgeCreat try { - var edge = await _membaseApi.CreateEdgeAsync(graphId, request); + var graph = _services.GetServices().First(x => x.Provider == GraphDbProvider); + var edge = await graph.CreateEdgeAsync(graphId, new GraphEdgeCreationRequest + { + Id = request.Id, + SourceNodeId = request.SourceNodeId, + TargetNodeId = request.TargetNodeId, + Type = request.Type, + Directed = request.Directed, + Weight = request.Weight, + Properties = request.Properties + }); return Ok(edge); } catch (Exception ex) @@ -368,7 +396,12 @@ public async Task UpdateEdge(string graphId, [FromBody] EdgeUpdat try { - var edge = await _membaseApi.UpdateEdgeAsync(graphId, request.Id, request); + var graph = _services.GetServices().First(x => x.Provider == GraphDbProvider); + var edge = await graph.UpdateEdgeAsync(graphId, request.Id, new GraphEdgeUpdateRequest + { + Id = request.Id, + Properties = request.Properties + }); return Ok(edge); } catch (Exception ex) @@ -406,7 +439,8 @@ public async Task DeleteEdge(string graphId, string edgeId) try { - await _membaseApi.DeleteEdgeAsync(graphId, edgeId); + var graph = _services.GetServices().First(x => x.Provider == GraphDbProvider); + await graph.DeleteEdgeAsync(graphId, edgeId); return Ok("done"); } catch (Exception ex) diff --git a/src/Plugins/BotSharp.Plugin.Membase/GraphDb/MembaseGraphDb.cs b/src/Plugins/BotSharp.Plugin.Membase/GraphDb/MembaseGraphDb.cs index a9b5b0b43..1a0c7c1f6 100644 --- a/src/Plugins/BotSharp.Plugin.Membase/GraphDb/MembaseGraphDb.cs +++ b/src/Plugins/BotSharp.Plugin.Membase/GraphDb/MembaseGraphDb.cs @@ -1,3 +1,4 @@ +using BotSharp.Plugin.Membase.Models.Graph; using Polly; using Polly.Timeout; using Refit; @@ -10,6 +11,8 @@ public partial class MembaseGraphDb : IGraphDb private readonly ILogger _logger; private readonly IMembaseApi _membaseApi; + private const int RETRY_COUNT = 3; + public MembaseGraphDb( IServiceProvider services, ILogger logger, @@ -22,8 +25,6 @@ public MembaseGraphDb( public string Provider => "membase"; - private const int RetryCount = 3; - public async Task ExecuteQueryAsync(string query, GraphQueryExecuteOptions? options = null) { if (string.IsNullOrEmpty(options?.GraphId)) @@ -64,10 +65,88 @@ public async Task ExecuteQueryAsync(string query, GraphQueryEx } + #region Node + public async Task GetNodeAsync(string graphId, string nodeId) + { + var node = await _membaseApi.GetNodeAsync(graphId, nodeId); + return Node.ToGraphNodeModel(node); + } + + public async Task CreateNodeAsync(string graphId, GraphNodeCreationRequest request) + { + var node = await _membaseApi.CreateNodeAsync(graphId, new NodeCreationModel + { + Id = request.Id, + Labels = request.Labels, + Properties = request.Properties, + Time = request.Time + }); + return Node.ToGraphNodeModel(node); + } + + public async Task MergeNodeAsync(string graphId, string nodeId, GraphNodeUpdateRequest request) + { + var node = await _membaseApi.MergeNodeAsync(graphId, nodeId, new NodeUpdateModel + { + Id = request.Id, + Labels = request.Labels, + Properties = request.Properties, + Time = request.Time + }); + return Node.ToGraphNodeModel(node); + } + + public async Task DeleteNodeAsync(string graphId, string nodeId) + { + await _membaseApi.DeleteNodeAsync(graphId, nodeId); + return true; + } + #endregion + + #region Edge + public async Task GetEdgeAsync(string graphId, string edgeId) + { + var edge = await _membaseApi.GetEdgeAsync(graphId, edgeId); + return Edge.ToGraphEdgeModel(edge); + } + + public async Task CreateEdgeAsync(string graphId, GraphEdgeCreationRequest request) + { + var edge = await _membaseApi.CreateEdgeAsync(graphId, new EdgeCreationModel + { + Id = request.Id, + SourceNodeId = request.SourceNodeId, + TargetNodeId = request.TargetNodeId, + Type = request.Type, + Directed = request.Directed, + Weight = request.Weight, + Properties = request.Properties + }); + return Edge.ToGraphEdgeModel(edge); + } + + public async Task UpdateEdgeAsync(string graphId, string edgeId, GraphEdgeUpdateRequest request) + { + var edge = await _membaseApi.UpdateEdgeAsync(graphId, edgeId, new EdgeUpdateModel + { + Id = request.Id, + Properties = request.Properties + }); + return Edge.ToGraphEdgeModel(edge); + } + + public async Task DeleteEdgeAsync(string graphId, string edgeId) + { + await _membaseApi.DeleteEdgeAsync(graphId, edgeId); + return true; + } + #endregion + + #region Private methods private AsyncPolicy BuildRetryPolicy() { var settings = _services.GetRequiredService(); - var timeoutSeconds = (double)settings.TimeoutSecond / RetryCount; + var timeoutSeconds = (double)settings.TimeoutSecond / RETRY_COUNT; var timeoutPolicy = Policy.TimeoutAsync(TimeSpan.FromSeconds(timeoutSeconds)); @@ -77,15 +156,16 @@ private AsyncPolicy BuildRetryPolicy() .Or() .Or(ex => ex.StatusCode == HttpStatusCode.ServiceUnavailable) .WaitAndRetryAsync( - retryCount: RetryCount, + retryCount: RETRY_COUNT, sleepDurationProvider: retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), onRetry: (ex, timespan, retryAttempt, _) => { _logger.LogWarning(ex, "CypherQueryAsync retry {RetryAttempt}/{MaxRetries} after {Delay}s. Exception: {Message}", - retryAttempt, RetryCount, timespan.TotalSeconds, ex.Message); + retryAttempt, RETRY_COUNT, timespan.TotalSeconds, ex.Message); }); return Policy.WrapAsync(retryPolicy, timeoutPolicy); } + #endregion } diff --git a/src/Plugins/BotSharp.Plugin.Membase/Models/Graph/Edge.cs b/src/Plugins/BotSharp.Plugin.Membase/Models/Graph/Edge.cs index 697e11b13..f69bcc9c4 100644 --- a/src/Plugins/BotSharp.Plugin.Membase/Models/Graph/Edge.cs +++ b/src/Plugins/BotSharp.Plugin.Membase/Models/Graph/Edge.cs @@ -1,3 +1,5 @@ +using BotSharp.Abstraction.Graph.Models; + namespace BotSharp.Plugin.Membase.Models.Graph; public class Edge @@ -12,4 +14,21 @@ public class Edge public float? Weight { get; set; } public DateTime? CreatedAt { get; set; } public DateTime? UpdatedAt { get; set; } + + public static GraphEdgeModel ToGraphEdgeModel(Edge edge) + { + return new GraphEdgeModel + { + Id = edge.Id, + SourceNodeId = edge.SourceNodeId, + TargetNodeId = edge.TargetNodeId, + Type = edge.Type, + Properties = edge.Properties, + Direction = edge.Direction, + Directed = edge.Directed, + Weight = edge.Weight, + CreatedAt = edge.CreatedAt, + UpdatedAt = edge.UpdatedAt + }; + } } diff --git a/src/Plugins/BotSharp.Plugin.Membase/Models/Graph/Node.cs b/src/Plugins/BotSharp.Plugin.Membase/Models/Graph/Node.cs index c561558ef..c9492c9c6 100644 --- a/src/Plugins/BotSharp.Plugin.Membase/Models/Graph/Node.cs +++ b/src/Plugins/BotSharp.Plugin.Membase/Models/Graph/Node.cs @@ -15,4 +15,15 @@ public override string ToString() var labelsString = Labels.Count > 0 ? string.Join(", ", Labels) : "No Labels"; return $"Node ({labelsString}: {Id})"; } + + public static GraphNodeModel ToGraphNodeModel(Node node) + { + return new GraphNodeModel + { + Id = node.Id, + Labels = node.Labels, + Properties = node.Properties, + Time = node.Time + }; + } } diff --git a/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/EdgeCreationModel.cs b/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/EdgeCreationModel.cs index 2b0c0654b..a458c54f9 100644 --- a/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/EdgeCreationModel.cs +++ b/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/EdgeCreationModel.cs @@ -8,5 +8,5 @@ public class EdgeCreationModel public string Type { get; set; } = null!; public bool Directed { get; set; } = true; public float? Weight { get; set; } = 1.0f; - public object? Properties { get; set; } + public Dictionary? Properties { get; set; } } diff --git a/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/EdgeUpdateModel.cs b/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/EdgeUpdateModel.cs index c660f485d..96f0cc942 100644 --- a/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/EdgeUpdateModel.cs +++ b/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/EdgeUpdateModel.cs @@ -3,5 +3,5 @@ namespace BotSharp.Plugin.Membase.Models; public class EdgeUpdateModel { public string? Id { get; set; } - public object? Properties { get; set; } + public Dictionary? Properties { get; set; } } diff --git a/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/NodeCreationModel.cs b/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/NodeCreationModel.cs index 79213b578..8ee3cd7a9 100644 --- a/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/NodeCreationModel.cs +++ b/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/NodeCreationModel.cs @@ -4,7 +4,7 @@ public class NodeCreationModel { public string? Id { get; set; } public string[]? Labels { get; set; } - public object? Properties { get; set; } + public Dictionary? Properties { get; set; } public NodeEmbedding? Embedding { get; set; } public DateTime? Time { get; set; } } diff --git a/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/NodeUpdateModel.cs b/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/NodeUpdateModel.cs index 153d8dcf8..9a465c2fa 100644 --- a/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/NodeUpdateModel.cs +++ b/src/Plugins/BotSharp.Plugin.Membase/Models/Requests/NodeUpdateModel.cs @@ -4,7 +4,7 @@ public class NodeUpdateModel { public string Id { get; set; } = null!; public string[]? Labels { get; set; } - public object? Properties { get; set; } + public Dictionary? Properties { get; set; } public NodeEmbedding? Embedding { get; set; } public DateTime? Time { get; set; } } \ No newline at end of file diff --git a/src/Plugins/BotSharp.Plugin.Membase/Services/MembaseService.cs b/src/Plugins/BotSharp.Plugin.Membase/Services/MembaseService.cs deleted file mode 100644 index d5f79cb1a..000000000 --- a/src/Plugins/BotSharp.Plugin.Membase/Services/MembaseService.cs +++ /dev/null @@ -1,52 +0,0 @@ -using BotSharp.Abstraction.Graph.Models; -using BotSharp.Plugin.Membase.Interfaces; -using BotSharp.Plugin.Membase.Models.Graph; - -namespace BotSharp.Plugin.Membase.Services; - -[Obsolete] -public class MembaseService -{ - private readonly IServiceProvider _services; - private readonly IMembaseApi _membase; - - public MembaseService(IServiceProvider services, IMembaseApi membase) - { - _services = services; - _membase = membase; - } - - public async Task Execute(string graphId, string query, Dictionary? args = null) - { - var response = await _membase.CypherQueryAsync(graphId, new CypherQueryRequest - { - Query = query, - Parameters = args ?? [] - }); - - return new GraphQueryResult - { - Keys = response.Columns, - Values = response.Data - }; - } - - public async Task MergeNode(string graphId, Node node) - { - var newNode = await _membase.MergeNodeAsync(graphId, node.Id, new NodeUpdateModel - { - Id = node.Id, - Labels = [.. node.Labels], - Properties = node.Properties, - Time = node.Time - }); - - return node; - } - - public async Task DeleteNode(string graphId, string nodeId) - { - await _membase.DeleteNodeAsync(graphId, nodeId); - return true; - } -} diff --git a/src/Plugins/BotSharp.Plugin.Membase/Using.cs b/src/Plugins/BotSharp.Plugin.Membase/Using.cs index e31467b5d..c7056cdb3 100644 --- a/src/Plugins/BotSharp.Plugin.Membase/Using.cs +++ b/src/Plugins/BotSharp.Plugin.Membase/Using.cs @@ -22,5 +22,6 @@ global using BotSharp.Abstraction.Graph; global using BotSharp.Abstraction.Graph.Models; global using BotSharp.Abstraction.Graph.Options; +global using BotSharp.Abstraction.Graph.Requests; global using BotSharp.Abstraction.Options; global using BotSharp.Plugin.Membase.Interfaces; From 74060c08d8c1cd481e4acfc9876f1fe953d430dd Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Wed, 22 Apr 2026 11:56:12 -0500 Subject: [PATCH 2/2] clean code --- .../BotSharp.Plugin.Membase/Controllers/MembaseController.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Plugins/BotSharp.Plugin.Membase/Controllers/MembaseController.cs b/src/Plugins/BotSharp.Plugin.Membase/Controllers/MembaseController.cs index 6a057f5e5..caaf3ab39 100644 --- a/src/Plugins/BotSharp.Plugin.Membase/Controllers/MembaseController.cs +++ b/src/Plugins/BotSharp.Plugin.Membase/Controllers/MembaseController.cs @@ -1,5 +1,3 @@ -using BotSharp.Abstraction.Graph; -using BotSharp.Plugin.Membase.Interfaces; using Microsoft.AspNetCore.Http; namespace BotSharp.Plugin.Membase.Controllers;