Able to create and read data from the DB
This commit is contained in:
+4
-2
@@ -2,6 +2,7 @@ using System;
|
||||
|
||||
using MongoDB.Bson;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Conventions;
|
||||
using MongoDB.Driver;
|
||||
|
||||
namespace TextSender_API.Models;
|
||||
@@ -9,8 +10,9 @@ namespace TextSender_API.Models;
|
||||
public class User
|
||||
{
|
||||
#region Properties
|
||||
// [BsonElement("_id")]
|
||||
public ObjectId Id { get; set; }
|
||||
[BsonId]
|
||||
[BsonRepresentation(BsonType.ObjectId)]
|
||||
public string? Id { get; set; }
|
||||
[BsonElement("firstname")]
|
||||
public string? Firstname { get; set; }
|
||||
[BsonElement("lastname")]
|
||||
|
||||
Reference in New Issue
Block a user