INNER CODE UNIT · C#

Otter

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

    public abstract class Otter : Animal { }

    [BsonDiscriminator("Enhydra lutris")]
    public class SeaOtter : Otter { }

    [BsonDiscriminator("Lutra lutra")]
    public class EurasianOtter : Otter { }

    public class Employee
    {
        // 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
        [BsonId, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public ObjectId EmployeeId { get; [UsedImplicitly] private set; }

        public string FirstName { get; set; }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…