Why Seed Method does not call ?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
puvinax
Posts: 10
Joined: Mon 09 Sep 2013 15:43

Why Seed Method does not call ?

Post by puvinax » Sun 29 Sep 2013 17:00

Hello
The sample code that I need on my own and it similar to the your sample code you've written
Something went wrong and it is
Seed method is not called in class LeitnerContextCreateDatabaseIfNotExists
Therefore tables can be built
But they can not be made for initial values
Please Guide me
Thanks

Sample Code : http://www.solidfiles.com/d/4632d66fc2/

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

Re: Why Seed Method does not call ?

Post by Shalex » Tue 01 Oct 2013 08:57

Please do right click on your solution in Solution Explorer > Properties > Common Properties > Project Dependencies. Select LeitnerBox in the Projects drop-down and set "Depends on" options for all available projects.
puvinax wrote:Seed method is not called in class LeitnerContextCreateDatabaseIfNotExists
1. Open App.config in the LeitnerBox project and create the connection string with the name of the context you are working with:

Code: Select all

<connectionStrings>
  <add name="LeitnerBoxContext" providerName="Devart.Data.SQLite" connectionString="DataSource=newDb.db3;Version=3;FailIfMissing=False;" />
</connectionStrings>
2. Open Form1.cs and add the following line after creating the leitner variable:

Code: Select all

leitner.Database.Initialize(false);

puvinax
Posts: 10
Joined: Mon 09 Sep 2013 15:43

Re: Why Seed Method does not call ?

Post by puvinax » Tue 01 Oct 2013 13:46

WOW Super Fantastic !!!
THANKS for your efforts :) :) :)

Post Reply