Skip to content

Instantly share code, notes, and snippets.

@iamNoah1
Created July 7, 2022 05:31
Show Gist options
  • Save iamNoah1/25d87d7a3bdb6854bb0b5657ceb2aa86 to your computer and use it in GitHub Desktop.
Save iamNoah1/25d87d7a3bdb6854bb0b5657ceb2aa86 to your computer and use it in GitHub Desktop.
Entity Class for BookReading API
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using System;
namespace BookReadingProject
{
public class BookReading : IEquatable<BookReading>
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string id;
public string name = string.Empty;
public int priority = 0;
public bool Equals(BookReading other)
{
return id.Equals(other.id) && name.Equals(other.name) && priority.Equals(other.priority);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment