简体   繁体   English

具有SQLite和实体框架的UWP数据库

[英]UWP database with SQLite and Entity Framework

I am trying to create and use database in UWP with SQLite and Entity Framework. 我正在尝试使用SQLite和Entity Framework在UWP中创建和使用数据库。

I am following this tutorial step by step. 我将逐步按照本教程进行操作。

The problem is, when I run 问题是,当我跑步时

Add-Migration MyFirstMigration

in console, this error shows up: 在控制台中,显示此错误:

Add-Migration : Cannot add the link because the source file C:\\Users\\Tomi\\Desktop\\sqewl\\3letnik\\Razvoj mobilnih reçitev\\App1\\App1\\Migrations\\2017011511 Add-Migration:由于源文件C:\\ Users \\ Tomi \\ Desktop \\ sqewl \\ 3letnik \\ Razvoj mobilrehreçitev\\ App1 \\ App1 \\ Migrations \\ 2017011511而无法添加链接
1417_MyFirstMigration.cs cannot be found. 1417_MyFirstMigration.cs找不到。
At line:1 char:1 在第1行:char:1
+ Add-Migration MyFirstMigration +添加迁移MyFirstMigration
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [Add-Migration], COMException + CategoryInfo:OperationStopped:(:) [Add-Migration],COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Add-Migration + FullyQualifiedErrorId:System.Runtime.InteropServices.COMException,添加迁移

What am I doing wrong here? 我在这里做错了什么?

Solution: 解:

I had 'š' in folder name and changed it to 's'. 我的文件夹名称中有“š”,并将其更改为“ s”。

In the console try this. 在控制台中尝试此操作。

Add-Migration -Name YourMigrationName -Project ProjectName -StartupProject ProjectName

I have been hitting the same error. 我一直遇到相同的错误。 And there are no clear documentations about it. 而且没有关于它的明确文档。 Hope it helps for someone 希望它对某人有帮助

实体框架不支持sqlite迁移。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM