Created
July 7, 2022 05:31
-
-
Save iamNoah1/25d87d7a3bdb6854bb0b5657ceb2aa86 to your computer and use it in GitHub Desktop.
Entity Class for BookReading API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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