Skip to content

Commit

Permalink
apparently BsonId initself does not ref to _id automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
fokklz committed Jan 14, 2024
1 parent aef2c05 commit 26d6f19
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions SkiServiceModels/Models/BSON/Order.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace SkiServiceModels.Models.BSON
public class Order : OrderBase, IGenericBSONModel
{
[BsonId]
[BsonElement("_id")]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; }

Expand Down
1 change: 1 addition & 0 deletions SkiServiceModels/Models/BSON/Priority.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace SkiServiceModels.Models.BSON
public class Priority : PriorityBase, IGenericBSONModel
{
[BsonId]
[BsonElement("_id")]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; }

Check warning on line 13 in SkiServiceModels/Models/BSON/Priority.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Non-nullable property 'Id' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
}
Expand Down
1 change: 1 addition & 0 deletions SkiServiceModels/Models/BSON/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace SkiServiceModels.Models.BSON
public class Service : ServiceBase, IGenericBSONModel
{
[BsonId]
[BsonElement("_id")]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; }

Check warning on line 13 in SkiServiceModels/Models/BSON/Service.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Non-nullable property 'Id' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
}
Expand Down
1 change: 1 addition & 0 deletions SkiServiceModels/Models/BSON/State.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace SkiServiceModels.Models.BSON
public class State : StateBase, IGenericBSONModel
{
[BsonId]
[BsonElement("_id")]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; }

Check warning on line 13 in SkiServiceModels/Models/BSON/State.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Non-nullable property 'Id' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
}
Expand Down
1 change: 1 addition & 0 deletions SkiServiceModels/Models/BSON/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace SkiServiceModels.Models.BSON
public class User : UserBase, IGenericBSONModel
{
[BsonId]
[BsonElement("_id")]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; }

Check warning on line 13 in SkiServiceModels/Models/BSON/User.cs

View workflow job for this annotation

GitHub Actions / build-and-publish

Non-nullable property 'Id' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
}
Expand Down

0 comments on commit 26d6f19

Please sign in to comment.