I am using version 9.5.454 of Devart.Data.Oracle and 4.8.1423 of Devart.Data.Oracle.Linq in a dotnet core 2.0.5 asp.net application, and I have a made a generic delete function where an object is given to the function as parameter (item):
Code: Select all
var sourceTable = mOtc.InnerDbContext.GetTable(typeof(T));
sourceTable.Attach(item, true);
sourceTable.DeleteOnSubmit(item);
mOtc.InnerDbContext.SubmitChanges();
When submitting changes Devart.Data.Linq throws an exception:
Code: Select all
System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Collections.Generic.Dictionary`2.Remove(TKey key)
at Devart.Data.Linq.Engine.el.e(IObjectEntry A_0)
at Devart.Data.Linq.Engine.c7.b(IObjectEntry A_0)
at Devart.Data.Linq.Engine.dl.h()
at Devart.Data.Linq.Engine.dz.a(ConflictMode A_0)
at Devart.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
at LeanfidsModel.CachedList`1.Remove(T item) in C:\Users\klaus\Documents\Visual Studio 2017\Projects\LeanfidsApi\LeanfidsModel\CachedList.cs:line 286
Code: Select all
[Column(Name = @"AIRPORT_CODE", Storage = "_AIRPORTCODE", CanBeNull = false, DbType = "VARCHAR2(4 CHAR) NOT NULL", IsPrimaryKey = true)]