This commit is contained in:
2024-06-14 16:06:24 -05:00
parent e75c10d6f0
commit 5e3f417c55
8 changed files with 215 additions and 90 deletions

View File

@ -1,3 +1,6 @@
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace Model
{
public class DataModel
@ -7,8 +10,15 @@ namespace Model
this.id = id;
}
public DataModel()
{
this.id = ObjectId.GenerateNewId().ToString();
}
[BsonId]
public string id { get; set; }
[BsonElement("message")]
public string? message { get; set; }
}
}