VictorTzeng / Zxw.Framework.NetCore

基于EF Core的Code First模式的DotNetCore快速开发框架,其中包括DBContext、IOC组件autofac和AspectCore.Injector、代码生成器(也支持DB First)、基于AspectCore的memcache和Redis缓存组件,以及基于ICanPay的支付库和一些日常用的方法和扩展,比如批量插入、更新、删除以及触发器支持,当然还有demo。欢迎提交各种建议、意见和pr~

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

首次运行错误,数据库mssql,求解一下

sinokiwa opened this issue · comments

An unhandled exception occurred while processing the request.
InvalidOperationException: The property expression 'm => Convert(m.Id, Object)' is not valid. The expression should represent a property access: 't => t.MyProperty'. For more information on including related data, see http://go.microsoft.com/fwlink/?LinkID=746393.

commented

做修改没有?

没有修改,只把数据库改到MSSQL
Startup.cs
82: var connectionString = Configuration.GetConnectionString("MsSqlServer");
87: DbType = DbType.MSSQLSERVER
appsettings.json
9: "MsSqlServer": "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=HolidaySchool;Integrated Security=True;Pooling=False",
这里数据库实例为SqlServer2016LocalDB(2017自带的)

执行query.include(include)

commented

请问你用的哪个分支呢?

@VictorTzeng 直接下载的zip

commented

呃,建议用dev分支。我目前还在休假,你先自行研究一下。欢迎提交pr