Hello,
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; }
}
Mapper:
builder.ToTable("FIN_SYSTEM_CONFIRMATION", "EFINUSER");
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");
