You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Remove Azure Table Storage service registration
Removed Azure Table Storage registration from services.
* Refactor TableStorageService constructor for config
Refactored constructor to initialize TableServiceClient based on environment variables for better configuration handling.
* Refactor namespace and add Azure.Identity using
* Move KnowledgeGraphService to Services namespace
* Move namespace for RelationService to Services
* Add using directives for Services and Storage
* Add Storage namespace to RelationService
* Add using directive for Storage namespace
* Refactor GraphFunctions to use constructor parameters
* Refactor relation ID handling in RelationService
* Refactor RelationService and add TableStorageService
* Refactor RelationService to implement IRelationService
Copy file name to clipboardExpand all lines: CentralMemoryMcp.Functions/Services/RelationService.cs
+133-9Lines changed: 133 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
1
usingAzure;
2
2
usingAzure.Data.Tables;
3
3
usingCentralMemoryMcp.Functions.Models;
4
+
usingCentralMemoryMcp.Functions.Storage;
4
5
5
-
namespaceCentralMemoryMcp.Functions;
6
+
namespaceCentralMemoryMcp.Functions.Services;
6
7
7
8
publicinterfaceIRelationService
8
9
{
@@ -19,7 +20,7 @@ public async Task<RelationModel> UpsertRelationAsync(RelationModel model, Cancel
19
20
{
20
21
vartable=awaitstorage.GetRelationsTableAsync(ct);
21
22
// Check for existing relation (same workspace, from, to, type)
22
-
stringfilter=$"PartitionKey eq '{model.WorkspaceName}' and FromEntityId eq '{model.FromEntityId.ToString("N")}' and ToEntityId eq '{model.ToEntityId.ToString("N")}' and RelationType eq '{EscapeFilterValue(model.RelationType)}'";
23
+
varfilter=$"PartitionKey eq '{model.WorkspaceName}' and FromEntityId eq '{model.FromEntityId:N}' and ToEntityId eq '{model.ToEntityId:N}' and RelationType eq '{EscapeFilterValue(model.RelationType)}'";
// Check for existing relation (same workspace, from, to, type)
149
+
varfilter=$"PartitionKey eq '{model.WorkspaceName}' and FromEntityId eq '{model.FromEntityId:N}' and ToEntityId eq '{model.ToEntityId:N}' and RelationType eq '{EscapeFilterValue(model.RelationType)}'";
0 commit comments