We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d321b62 commit 1c1ecebCopy full SHA for 1c1eceb
aspnetcore/tutorials/first-mongo-app/samples_snapshot/9.x/Book.cs
@@ -0,0 +1,20 @@
1
+using MongoDB.Bson;
2
+using MongoDB.Bson.Serialization.Attributes;
3
+
4
+namespace BookStoreApi.Models;
5
6
+public class Book
7
+{
8
+ [BsonId]
9
+ [BsonRepresentation(BsonType.ObjectId)]
10
+ public string? Id { get; set; }
11
12
+ [BsonElement("Name")]
13
+ public string BookName { get; set; } = null!;
14
15
+ public decimal Price { get; set; }
16
17
+ public string Category { get; set; } = null!;
18
19
+ public string Author { get; set; } = null!;
20
+}
0 commit comments