1. I have reinstalled LinqConnect. Also I have manually installed to GAC(Devart.Data.dll; Devart.Data.Linq.dll; Devart.Data.SQLite.dll; Devart.Data.SQLite.Linq.dll) and got strange error.
The result of model generation or query syntax is not valid.
Failed to compile and load the working library with the model.
Error List:
error1 : The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
error2 : The type 'System.IDisposable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
error3 : The type 'System.ComponentModel.INotifyPropertyChanging' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Devart.Data.Linq\v4.0_4.0.45.1__09af7300eec23701\Devart.Data.Linq.dll'
error4 : The type 'System.ComponentModel.INotifyPropertyChanging' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Devart.Data.Linq\v4.0_4.0.45.1__09af7300eec23701\Devart.Data.Linq.dll'
error5 : The type 'System.ComponentModel.PropertyChangingEventArgs' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Devart.Data.Linq\v4.0_4.0.45.1__09af7300eec23701\Devart.Data.Linq.dll'
error6 : The type 'System.ComponentModel.PropertyChangingEventHandler' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Devart.Data.Linq\v4.0_4.0.45.1__09af7300eec23701\Devart.Data.Linq.dll'
error7 : The type 'System.ComponentModel.PropertyChangingEventArgs' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Devart.Data.Linq\v4.0_4.0.45.1__09af7300eec23701\Devart.Data.Linq.dll'
error8 : The type 'System.ComponentModel.PropertyChangingEventHandler' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Devart.Data.Linq\v4.0_4.0.45.1__09af7300eec23701\Devart.Data.Linq.dll'
error9 : The type 'System.Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
error10 : 'Devart.Data.Linq.Mapping.DatabaseAttribute' is not an attribute class
error11 : 'Devart.Data.Linq.Mapping.ProviderAttribute' is not an attribute class
error12 : 'Devart.Data.Linq.Mapping.ColumnAttribute' is not an attribute class
error13 : 'Devart.Data.Linq.Mapping.ColumnAttribute' is not an attribute class
error14 : 'Devart.Data.Linq.Mapping.ColumnAttribute' is not an attribute class
error15 : 'Devart.Data.Linq.Mapping.AssociationAttribute' is not an attribute class
error16 : 'Devart.Data.Linq.Table' is not an attribute class
error17 : 'Devart.Data.Linq.Mapping.TableAttribute' is not an attribute class
error18 : 'Devart.Data.Linq.Mapping.ColumnAttribute' is not an attribute class
error19 : 'Devart.Data.Linq.Mapping.ColumnAttribute' is not an attribute class
error20 : 'Devart.Data.Linq.Mapping.ColumnAttribute' is not an attribute class
error21 : 'Devart.Data.Linq.Mapping.ColumnAttribute' is not an attribute class
error22 : 'Devart.Data.Linq.Mapping.ColumnAttribute' is not an attribute class
error23 : 'Devart.Data.Linq.Mapping.AssociationAttribute' is not an attribute class
error24 : 'Devart.Data.Linq.Table' is not an attribute class
error25 : 'Devart.Data.Linq.Mapping.TableAttribute' is not an attribute class
2. About second point. I cant place whole project, but I can place
http://sdrv.ms/RD3SDC. I have uploaded simple database model.
Also I have used that code:
Code: Select all
foreach (var g in DataModel.DataBaseSQ.db.TitleGroups)
{
in that place I use code that look like
g.KEY, g.NAME, g.NAME, g.IMG.SOURCE, g.IMG.FILENAME, g.DESCRIPTION
}
Is this correct to use something like that to access child table "g.IMG.FILENAME" where g is main table and "IMG" is child table?
UPD: It fixed after third reinstallation.
3. Script generation also is incorrect. When click on "Generate Database from Model", script is correct(it create database with FK option), but when I @db.CreateDatabase(false, true); database is creating without FK option.