EF6 - Failing to create database in code-first

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
PatrickC
Posts: 1
Joined: Mon 24 Feb 2014 16:53

EF6 - Failing to create database in code-first

Post by PatrickC » Mon 24 Feb 2014 16:59

Hi!

I'am currently evaluating your SQLite provider...

Unfortunately, I am not able to create the SQLite database as following:

Code: Select all

            
            SQLiteConnectionStringBuilder builder = new SQLiteConnectionStringBuilder();
            builder.DataSource = "D:\\test.db";
            // Does not have any effect...
            builder.FailIfMissing = false;
            var connection = builder.ToString();
            DataContext context = new DataContext(connection);
            System.Data.Entity.Database.DefaultConnectionFactory = new SQLiteConnectionFactory();

            context.Database.Create();
The SQLiteConnectionFactory I've adopted from one of your blog posts but the provider does not return a ManifestToken due to that it does not actually try to create but to connect to the database specified in the connection string...

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: EF6 - Failing to create database in code-first

Post by MariiaI » Tue 25 Feb 2014 12:15

We have sent you a test project to the e-mail address you have provided in your forum profile. Please check that the letter is not blocked by your mail filter.

Please also refer to:
http://blogs.devart.com/dotconnect/enti ... qlite.html
and http://blog.devart.com/entity-framework ... force.html - this blog article includes a link for the full sample project for Entity Framework 6.

Please tell us if this helps.

dgxhubbard
Posts: 47
Joined: Fri 14 Aug 2015 20:58

Re: EF6 - Failing to create database in code-first

Post by dgxhubbard » Tue 01 Aug 2017 18:11

I am using sqlite and entity framework. While researching not be able to create the database I came across this link. The links referred to in the answer do not exist so I cannot get information for my problem. This is the second time this has happened. Can you please restore the url:

http://blogs.devart.com/dotconnect/enti ... qlite.html

http://blogs.devart.com/ is a dead link. On top of that you email sln files to users rather than posting to the forum for future use, why not add to forum link. My company pays for the devart product. Why bother support with needless questions when this forum might provide ways to get answers.

dgxhubbard
Posts: 47
Joined: Fri 14 Aug 2015 20:58

Re: EF6 - Failing to create database in code-first

Post by dgxhubbard » Tue 01 Aug 2017 18:19

This appears to be the correct link:

http://blog.devart.com/entity-framework ... qlite.html

However, the sample sln in the article refers to link attached archive which produces error not found.
Again relevant examples reduce support questions. Also going through the blog links that do not work and cleaning them up could help users immensely

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: EF6 - Failing to create database in code-first

Post by Shalex » Thu 03 Aug 2017 10:45

dgxhubbard wrote:http://blog.devart.com/entity-framework ... qlite.html

However, the sample sln in the article refers to link attached archive which produces error not found.
Thank you for your report.

We have fixed the link to sample, but we recommend you to use the sample http://blog.devart.com/entity-framework ... ml#Samples. Be aware about EF assemblies naming change implemented after the article is written: viewtopic.php?t=33574 > the "Entity Framework Assembly Name Change" section. The VS > Tools > SQLite > Update Wizard should help to update versions / names automatically.

Post Reply