tag:blogger.com,1999:blog-4063545436138319205.post1881074637093754944..comments2024-03-29T02:21:46.578-07:00Comments on Tom DuPont .NET: How to use Entity Framework and SQLiteTom DuPonthttp://www.blogger.com/profile/08233783264428691459noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-4063545436138319205.post-70471977661344263242015-01-15T18:08:54.265-08:002015-01-15T18:08:54.265-08:00Great question! The default constructor for a Data...Great question! The default constructor for a DataContext will look in the app.config for a connection string with the same name as the type. Thus in the sample config I have a connection string named "TestContext"Tom DuPonthttps://www.blogger.com/profile/08233783264428691459noreply@blogger.comtag:blogger.com,1999:blog-4063545436138319205.post-76101321287745638262015-01-15T00:47:49.980-08:002015-01-15T00:47:49.980-08:00Nice, thanks for posting! I'm not in a positio...Nice, thanks for posting! I'm not in a position to test this currently. Out of curiosity, do you not have to have a default constructor on your TestContext to initialise the connection string? I know I have to do this using Express so wondered if it was the same with Lite? <br /><br />Eg; <br /><br />public class TestContext : DbContext<br />{<br /> public TestContext() : base("TestContext") //the name of your connection string<br /> {<br /><br /> }<br /> public DbSet Users { get; set; }<br />}<br /><br />Nice blog! :) Pacehttps://www.blogger.com/profile/01154633667212911314noreply@blogger.com