• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Elaine00
博客园    首页    新随笔    联系   管理    订阅  订阅

EF数据库连接时候出错

users: EntityType: EntitySet 'users' is based on type 'UserModel' that has no keys defined.

TreeLayer.DAL.UserModel: : EntityType 'UserModel' has no key defined. Define the key for this EntityType.

users: EntityType: EntitySet 'users' is based on type 'UserModel' that has no keys defined.

 


在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 50 - 发生了本地数据库运行时错误。指定的 LocalDB 实例不存在。

)

 

解决方案:执行命令sqllocaldb start v11.0

 

作者:Elaine
出处:http://www.cnblogs.com/ITGirl00/
交流QQ:392989505
posted @ 2014-06-28 00:47  Elaine00  阅读(585)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3