File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Data . Entity . Core . Metadata . Edm ;
3+ using System . Data . Entity . Infrastructure ;
4+ using System . Data . Entity . ModelConfiguration . Conventions ;
5+
6+ namespace SQLite . CodeFirst . Convention
7+ {
8+ public class SqliteForeignKeyIndexConvention : IStoreModelConvention < AssociationType >
9+ {
10+ public virtual void Apply ( AssociationType item , DbModel model )
11+ {
12+ if ( item == null )
13+ {
14+ throw new ArgumentNullException ( "item" ) ;
15+ }
16+ if ( model == null )
17+ {
18+ throw new ArgumentNullException ( "model" ) ;
19+ }
20+ if ( item . Constraint == null )
21+ {
22+ return ;
23+ }
24+ }
25+ }
26+ }
Original file line number Diff line number Diff line change 7777 <Compile Include =" Builder\ForeignKeyStatementBuilder.cs" />
7878 <Compile Include =" Builder\CreateDatabaseStatementBuilder.cs" />
7979 <Compile Include =" Builder\PrimaryKeyStatementBuilder.cs" />
80+ <Compile Include =" Convention\SqliteForeignKeyIndexConvention.cs" />
8081 <Compile Include =" Extensions\EntityTypeExtension.cs" />
8182 <Compile Include =" SqliteCreateDatabaseIfNotExists.cs" />
8283 <Compile Include =" SqliteDropCreateDatabaseAlways.cs" />
You can’t perform that action at this time.
0 commit comments