mirror of
https://bitbucket.org/myhomie/mycorerepository.git
synced 2025-12-06 17:51:20 +00:00
29 lines
639 B
C#
29 lines
639 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
|
namespace MyCore.Models
|
|
{
|
|
public class Book
|
|
{
|
|
[BsonId]
|
|
[BsonRepresentation(BsonType.ObjectId)]
|
|
public string Id { get; set; }
|
|
|
|
[BsonElement("Name")]
|
|
public string BookName { get; set; }
|
|
|
|
[BsonElement("Price")]
|
|
public decimal Price { get; set; }
|
|
|
|
[BsonElement("Category")]
|
|
public string Category { get; set; }
|
|
|
|
[BsonElement("Author")]
|
|
public string Author { get; set; }
|
|
}
|
|
}
|