From 20776516fdcf4ac5d39c3a2a386fa85802413be8 Mon Sep 17 00:00:00 2001 From: Ignacio Gomez Date: Fri, 27 Jun 2025 20:15:51 -0600 Subject: [PATCH] Added bsontype --- Inventory/InventoryItem.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Inventory/InventoryItem.cs b/Inventory/InventoryItem.cs index 2919917..b37312b 100644 --- a/Inventory/InventoryItem.cs +++ b/Inventory/InventoryItem.cs @@ -1,4 +1,5 @@ -using MongoDB.Bson.Serialization.Attributes; +using MongoDB.Bson; +using MongoDB.Bson.Serialization.Attributes; using System.Text.Json.Serialization; namespace Core.Adapters.Lib @@ -18,10 +19,12 @@ namespace Core.Adapters.Lib public string Currency { get; set; } = null!; [BsonElement("categoryId")] + [BsonRepresentation(BsonType.String)] [JsonPropertyName("categoryId")] public Guid CategoryId { get; set; } [BsonElement("providerId")] + [BsonRepresentation(BsonType.String)] [JsonPropertyName("providerId")] public Guid ProviderId { get; set; }