I am getting this error when trying to save entity with BLOB database column type.
I am using pure EF fluent mapping, no .edml file, with stored procedures
Entity :
Code: Select all
public partial class File
{
public byte[] FileData { get; set; }
}
Code: Select all
public class FileMap : EntityTypeConfiguration<File>
{
public FileMap()
{
this.Property(t => t.FileData)
.IsRequired();
// Table & Column Mappings
this.ToTable("V_SHEET_FILE", "DEV");
this.MapToStoredProcedures(s=>s.Insert(i=>i.HasName("SHEET_FILE_I", "ADAPTER")).Update(d=>d.HasName("SHEET_FILE_U", "ADAPTER").RowsAffectedParameter("AFFECTEDROWS")).Delete(d=>d.HasName("SHEET_FILE_D", "ADAPTER").RowsAffectedParameter("AFFECTEDROWS")));
this.Property(t => t.FileData).HasColumnType("BLOB").HasColumnName("FILE_DATA");
}
}
Code: Select all
at System.Data.Common.CommandTrees.d.a(String A_0, Int32& A_1)
at System.Data.Common.CommandTrees.d.b(TypeUsage A_0, Int32& A_1)
at System.Data.Common.CommandTrees.b.a(EdmFunction A_0)
at System.Data.Common.CommandTrees.d.a(EdmFunction A_0)
at System.Data.Common.CommandTrees.c.a(DbFunctionCommandTree A_0)
at System.Data.Common.CommandTrees.c.a(DbCommandTree A_0)
at System.Data.Common.CommandTrees.c.b(DbCommandTree A_0)
at Devart.Data.Oracle.Entity.OracleEntityProviderServices.a(az A_0, DbCommandTree A_1)
at Devart.Data.Oracle.Entity.OracleEntityProviderServices.CreateDbCommandDefinition(DbProviderManifest baseProviderManifest, DbCommandTree commandTree)
at System.Data.Entity.Core.Common.DbProviderServices.CreateDbCommandDefinition(DbProviderManifest providerManifest, DbCommandTree commandTree, DbInterceptionContext interceptionContext)
at System.Data.Entity.Core.Common.DbProviderServices.CreateCommandDefinition(DbCommandTree commandTree, DbInterceptionContext interceptionContext)
at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.GenerateCommandDefinition(ModificationFunctionMapping functionMapping)
at System.Data.Entity.Core.Mapping.Update.Internal.FunctionUpdateCommand..ctor(ModificationFunctionMapping functionMapping, UpdateTranslator translator, ReadOnlyCollection`1 stateEntries, ExtractedStateEntry stateEntry)
at System.Data.Entity.Core.Mapping.Update.Internal.ModificationFunctionMappingTranslator.EntitySetTranslator.Translate(UpdateTranslator translator, ExtractedStateEntry stateEntry)
at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.<ProduceFunctionCommands>d__1a.MoveNext()
at System.Linq.Enumerable.<ConcatIterator>d__71`1.MoveNext()
at System.Data.Entity.Core.Mapping.Update.Internal.UpdateCommandOrderer..ctor(IEnumerable`1 commands, UpdateTranslator translator)
at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.ProduceCommands()
at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()
at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.<Update>b__2(UpdateTranslator ut)
at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update[T](T noChangesResult, Func`2 updateFunction)
at System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update()
at System.Data.Entity.Core.Objects.ObjectContext.<SaveChangesToStore>b__35()
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction)
at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass2a.<SaveChangesInternal>b__27()
at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction)
at System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options)
at System.Data.Entity.Internal.InternalContext.SaveChanges()
at System.Data.Entity.Internal.LazyInternalContext.SaveChanges()
at System.Data.Entity.DbContext.SaveChanges()
...
Code: Select all
switch (A_0)
{
...
case "BLOB":
A_1 = 3;
break;
...
}
Is there any chance this might be corrected?
Thank you for any help!