问题
When I attempt to update in SubSonic I'm greeted with a Null Reference Exception.
This is the exception message I get:
Object reference not set to an instance of an object.","StackTrace":" at SubSonic.Query.Update.GetCommand()
I've checked the object I'm updating and there are no missing fields, all the class properties match the database column names.
Any Ideas what this could be? Cheers Tony
回答1:
Apparently this is an issue already found. I've followed what the OP of the issue stated and it works fine.
This is how to fix it for the time being:
Go to : http://github.com/subsonic/SubSonic-3.0/tree/master , then click on download and select 3.0.0.3.
In Subsonic.Core/Query/Update.cs go to the "GetCommand" method (line 244)
Change x => x.Name.Equals
for this
x => x.QualifiedName.Equals
Compile it and your sorted.
来源:https://stackoverflow.com/questions/1178021/subsonic-3-0-0-3-update-exception