init commit
This commit is contained in:
21
APITest2/Models/Book.cs
Normal file
21
APITest2/Models/Book.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace APITest2.Models;
|
||||
|
||||
public class Book
|
||||
{
|
||||
[BsonId]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
public string? Id { get; set; }
|
||||
|
||||
[BsonElement("Name")]
|
||||
public string BookName { get; set; } = null!;
|
||||
|
||||
public decimal Price { get; set; }
|
||||
|
||||
public string Category { get; set; } = null!;
|
||||
|
||||
public string Author { get; set; } = null!;
|
||||
}
|
||||
Reference in New Issue
Block a user