From 41bd0274703f4f4898f2dec4dca8b891ee9e094a Mon Sep 17 00:00:00 2001 From: Timourka Date: Wed, 8 May 2024 01:08:23 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B2=D1=8B=D0=BD=D0=B5=D1=81=D0=BB=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=D0=B4=D0=BE=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=B2=20?= =?UTF-8?q?=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SUBD_Car_rent/database/ImplementationMongoDB.cs | 6 +----- SUBD_Car_rent/database/models.cs | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/SUBD_Car_rent/database/ImplementationMongoDB.cs b/SUBD_Car_rent/database/ImplementationMongoDB.cs index 7b549f6..3265bca 100644 --- a/SUBD_Car_rent/database/ImplementationMongoDB.cs +++ b/SUBD_Car_rent/database/ImplementationMongoDB.cs @@ -12,11 +12,7 @@ namespace database private IMongoCollection _branchCollection; private IMongoCollection _statusCollection; private IMongoCollection _bodyTypeCollection; - private class Sequence - { - public string Id; - public int count; - } + private IMongoCollection _sequenceCollection; public ImplementationMongoDB() diff --git a/SUBD_Car_rent/database/models.cs b/SUBD_Car_rent/database/models.cs index df97c73..21ce991 100644 --- a/SUBD_Car_rent/database/models.cs +++ b/SUBD_Car_rent/database/models.cs @@ -78,4 +78,10 @@ namespace database public string Text { get; set; } public int Id { get; set; } } + public class Sequence + { + [BsonRepresentation(BsonType.String)] + public string Id { get; set; } + public int count { get; set; } + } }