I have always seen that in all tutorials, databases are made in the form of code-first, but already there is a sqlite database that I want to use in my project. And I want to use entity 7 too. To do so, I made some classes from my database by means of a dll but it didn't work. In fact, I made these classes so that I could use my own database. I didn't want it to create a new database. Any suggestions? Can you recommend me any links,because I couldn't find any useful link
I install Install-Package EntityFramework.SQLite –Pre and Install-Package EntityFramework.Commands –Pre and Install-Package SQLite.Net.Async-PCL /next step: with Extension ،SQL Server Compact/SQLite Toolbox generate classes from db and import my db into project in visual studio and set buildaction to content and in final add
private async Task CopyDatabase()
{
bool isDatabaseExisting = false;
try
{
StorageFile storageFile = await ApplicationData.Current.LocalFolder.GetFileAsync("people.db");
isDatabaseExisting = true;
}
catch
{
isDatabaseExisting = false;
}
if (!isDatabaseExisting)
{
StorageFile databaseFile = await Package.Current.InstalledLocation.GetFileAsync("people.db");
await databaseFile.CopyAsync(ApplicationData.Current.LocalFolder);
}
}
into pp.xaml