Subsonic 3 - 更新 NullReferenceException [英] Subsonic 3 - Update NullReferenceException

查看:28
本文介绍了Subsonic 3 - 更新 NullReferenceException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 Subsonic v3.0.0.3 与 Linq 模板一起使用.我正在尝试使用以下内容更新 SQL Server Express 数据库中的记录:

I am using Subsonic v3.0.0.3 with the Linq templates. I am attempting to update a record in a SQL Server Express database with the following:

var db = new MyDB(Constants.Database);
db.Update<Contact>()
  .Set(d => d.FirstName == contact.FirstName)
  .Where(d => d.Id == contact.Id)
  .Execute();

执行此行时,我收到 NullReferenceException.堆栈跟踪如下:

I am receiving a NullReferenceException when this line is executed. The stack trace is as follows:

   at SubSonic.Query.Update.GetCommand()
   at SubSonic.Query.Update.Execute()

有人可以提出问题所在吗?

Any chance that someone may be able to suggest what the problem is?

推荐答案

嗯 - 我会说确保连接字符串存在(我将在接下来的几周内修复丢失连接字符串的错误消息),而不是那 - 这看起来像一个问题 - 你介意在 Github 上发帖吗?

Hmm - I would say to make sure the connection string is present (I'll be fixing the error message for missing connection strings in the coming weeks) other than that - this looks like an issue - would you mind posting at Github?

这篇关于Subsonic 3 - 更新 NullReferenceException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆