Book.cs 407 B

12345678910111213141516
  1. using MongoDB.Bson;
  2. using MongoDB.Bson.Serialization.Attributes;
  3. namespace BookShelfMongoDB
  4. {
  5. public class Book
  6. {
  7. [BsonId]
  8. [BsonRepresentation(BsonType.ObjectId)]
  9. public int Id { get; set; }
  10. public string Name { get; set; }
  11. public decimal Price { get; set; }
  12. public string Category { get; set; }
  13. public string Author { get; set; }
  14. }
  15. }