I have the following tools in my computer:
1) Oracle Client 12.2.0 x64
2) dotConect for Oracle 9.13 (trial version)
3) MS VS 2019
Now I create a concole application for .NetFramework 4.7.2 in MS VS 2019.
Than I compile this application as x64 with the following code.
Code: Select all
[Table(Name = "OBJ$GROUPS")]
public class Group
{
long _No;
[Column(Name = "NO", Storage = "_No", IsPrimaryKey = true)]
public long No { get { return _No; } }
}
Code: Select all
public class Result
{
public long No { get; set; }
public long? TypeNo { get; set; }
}
Code: Select all
[ProviderAttribute(typeof(Devart.Data.Oracle.Linq.Provider.OracleDataProvider))]
public class TypeTreeDataContext : DataContext
{
public TypeTreeDataContext(OracleConnection conn) : base(conn) { ObjectTrackingEnabled = false; }
public Table<Group> Group => GetTable<Group>();
}
Code: Select all
static void Main(string[] args)
{
OracleConnection conn = new OracleConnection("Pooling=false") { UserId = Login, Password = Password, Server =
Server, Direct = false };
conn.Open();
var data = new TypeTreeDataContext(conn);
var res= data.Group
.Where(g => g.No >= 1000000 && g.No <= 1050000)
.Select(g => new Result{
No = g.No,
TypeNo = 10
})
.ToList();
}
The error have the following message:
"Конструктор для типа "System.Runtime.CompilerServices.StrongBox`1[[System.Nullable`1[[System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]" не найден"
What happend? This problem is not appeared in dotConnect 6.60.258 (but for x86).
Note that the problem is solved after removing TypeNo in the result and the application should be compiled by x64.