INNER CODE UNIT · C#

Animal

BlueshiftSoftware/EntityFrameworkCore · src/Blueshift.EntityFrameworkCore.MongoDB.SampleDomain/ZooDbContext.cs:54

    public abstract class Animal
    {
        // When using attribute-driven data modeling, either [BsonId] or [Key]
        // is required for the primary key field; either will work with the
        // MongoDb C# driver EFCore adapter
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public ObjectId AnimalId { get; [UsedImplicitly] private set; }

        public string Name { get; set; }

        public decimal Age { get; set; }

        public decimal Height { get; set; }

        public decimal Weight { get; set; }

        [ConcurrencyCheck, DatabaseGenerated(DatabaseGeneratedOption.Computed)]
        public string ConcurrencyField { get; [UsedImplicitly] private set; }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…