Skip to content

Instantly share code, notes, and snippets.

@tuannguyenssu tuannguyenssu/Book.cs Secret
Created Sep 26, 2019

Embed
What would you like to do?
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace MongoDBTest.Models
{
public class Book
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; }
[BsonElement("Name")]
public string Name { get; set; }
public decimal Price { get; set; }
public string Category { get; set; }
public string Author { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.