Oracle.EntitiyFramewokCore ENUM Conversion Problem — oracle-tech

    Forum Stats

  • 3,715,654 Users
  • 2,242,820 Discussions


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Oracle.EntitiyFramewokCore ENUM Conversion Problem

4081139 Member Posts: 1
edited September 2019 in ODP.NET


We are migrating our project to .net core and are using Oracle.EntitiyFramewokCore to connect to Oracle DB. But we have a problem with ENUM types. Please see below for more detail.

ERROR: Microsoft.EntityFrameworkCore.DbUpdateException: 'An error occurred while updating the entries. See the inner exception for details.'

Inner Exception: ArgumentException: Value does not fall within the expected range.

public class SystemConfirmation


        public long Id { get; set; }

        public long? ObjectId { get; set; }

        public SystemConfirmationStatus Status { get; set; }

        public ObjectType Type { get; set; }

        public byte[] Data { get; set; }

        public string DataType { get; set; }

        public long CompanyId { get; set; }

        public ConfirmationActionTypes ActionType { get; set; }

        public DateTime? InsertDatetime { get; set; }

        public DateTime? SysLastUpdate { get; set; }

        public int? SysVersion { get; set; }




            builder.HasKey(x => x.Id);

            builder.Property(x => x.Id).HasColumnName("ID").HasColumnType("NUMBER(12)");

            builder.Property(x => x.ObjectId).HasColumnName("OBJECT_ID").HasColumnType("NUMBER(12)");

            builder.Property(x => x.Status).HasColumnName("STATUS").HasColumnType("NUMBER(10)");

            builder.Property(x => x.Type).HasColumnName("TYPE").HasColumnType("NUMBER(10)");

            builder.Property(x => x.Data).HasColumnName("DATA").HasColumnType("BLOB");

            builder.Property(x => x.DataType).HasColumnName("DATA_TYPE").HasColumnType("VARCHAR2").HasMaxLength(1000);

            builder.Property(x => x.CompanyId).HasColumnName("COMPANY_ID").HasColumnType("NUMBER(12)").HasMaxLength(10);

            builder.Property(x => x.ActionType).HasColumnName("ACTION_TYPE").HasColumnType("NUMBER(10)");

            builder.Property(x => x.SysVersion).HasColumnName("SYS_VERSION").HasColumnType("NUMBER(10)");

            builder.Property(x => x.SysLastUpdate).HasColumnName("SYS_LAST_UPDATE").HasColumnType("DATE");

            builder.Property(x => x.InsertDatetime).HasColumnName("INSERT_DATETIME").HasColumnType("DATE");



Sign In or Register to comment.