Book.cs 519 B

123456789101112131415161718192021
  1. using MongoDB.Bson;
  2. using MongoDB.Bson.Serialization.Attributes;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace Bookstore
  9. {
  10. public class Book
  11. {
  12. [BsonId]
  13. [BsonRepresentation(BsonType.ObjectId)]
  14. public string Id { get; set; }
  15. public string Name { get; set; }
  16. public decimal Price { get; set; }
  17. public string Category { get; set; }
  18. public string Author { get; set; }
  19. }
  20. }