Re: [sqlite] SQLite with Entity Framework problem

2014-05-06 Thread Joe Mistachkin

Christiano Borchardt wrote:
> 
> My SQL server has a table with a primary key of type smallint which is an
> identity column. This is the AUTOINCREMENT equivalent on SQLite. However
> AUTOINCREMENT in SQlite only allows the Integer type.
> When the entity framework loads the entity for this table it crashes
> because the type returned by SQLite data provider is an Int64 while the
> expected by EF is Int16.
> 

I'm not sure why Entity Framework would use an Int16 for that.  What is the
schema of the database table in question?  Also, could you include the code
for the associated entity class?

> 
> The version of SQLite I'm using is 1.0.92.0 and the entity framework is
> 6.0.0.0.
> 

Is the version of Entity Framework exactly 6.0.0.0 or is it something like
6.0.0.2?

--
Joe Mistachkin

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite with Entity Framework problem

2014-05-06 Thread Christiano Borchardt
Hi there,

We have a system which uses SQL server as a primary database. We are
thinking about replacing the entity framework provider so we can use SQLite
in-memory for integration tests.

I have done few tests and generally System.Data.SQlite works fine. The only
exception I have so far is:

My SQL server has a table with a primary key of type smallint which is an
identity column. This is the AUTOINCREMENT equivalent on SQLite. However
AUTOINCREMENT in SQlite only allows the Integer type.
When the entity framework loads the entity for this table it crashes
because the type returned by SQLite data provider is an Int64 while the
expected by EF is Int16.

Is there a way to tweak or by pass this behavior?

The version of SQLite I'm using is 1.0.92.0 and the entity framework is
6.0.0.0.

Thanks.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users