ABP 01 下载项目等

原文:https://www.cnblogs.com/ldybyz/p/8441084.html

照着这篇文章弄 一般是没有什么问题的

记录一下我出现的问题,大多是没有仔细看文章。

1、无法迁移数据库,错误如下:

  Your startup project 'MyABP.Core' doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is correct, install the package, and try again.    

   解决:设置 EntityFrameworkCore 为启动项目,然后再迁移。

  

2、运行项目后,打开user列表报错,错误如下:

  SqlException: Incorrect syntax near 'OFFSET'. Invalid usage of the option NEXT in the FETCH statement.

  我数据库是SQL Server 2008

  解决:

    语句位置:MyABP.EntityFrameworkCore.MyABPDbContextConfigurer 的 Configure 方法

    将  builder.UseSqlServer(connectionString);  修改为  builder.UseSqlServer(connectionString, b => b.UseRowNumberForPaging());

猜你喜欢

转载自www.cnblogs.com/guxingy/p/11792399.html
ABP
今日推荐