選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

BaseMongo.cs 430B

123456789101112131415
  1. using MongoDB.Bson;
  2. using MongoDB.Bson.Serialization.Attributes;
  3. namespace Diligent.WebAPI.Data.Entities
  4. {
  5. public class BaseMongo
  6. {
  7. [BsonId]
  8. [BsonRepresentation(BsonType.ObjectId)]
  9. public string? Id { get; set; }
  10. public DateTime CreatedAtUtc { get; set; } = DateTime.UtcNow;
  11. public DateTime? UpdatedAtUtc { get; set; }
  12. public DateTime? DeletedAtUtc { get; set; }
  13. }
  14. }