Apr 12, 2008 at 8:35 AM
Post your questions & suggestions here !
Jan 20, 2010 at 6:28 PM
Edited Jan 20, 2010 at 8:00 PM

Hey Mikhail!

I am posting here to help SEO!

I am using the core and I know this is simple, but as you know. I claim to always be stupid. Maybe I am?

I have am trying to insert a new record but I get:

Object reference not set to an instance of an object.   here: Line 122:                _dao.SaveOrUpdate(modification);

I have simplified everything so that it only looks for one required field and the id, which is identity. I  have v


Modification.cs (editor doesn't paste well but here are the basics)

PersistentProperty: DocFee (as _docfee) & ModificationId (as _id)


<font size="2">



private int _id;


private string _docfee;



Modification modification = new Modification();


// modification.DocFee = DocFee.Text.Trim(); <font size="2">

modification.DocFee =


"500";<font size="2">





<font size="2">




Console.WriteLine("Saved Mod " + modification.DocFee + " ID:" + modification.Id);




 What did I miss??

just noticed code snippet in case you need it.

Jan 21, 2010 at 12:17 AM


I think you need to create an instance of DataBaseObjectsFactorySQLServer class using your connection string:

private const string _connString = "server=LOCNOTE\\SQLEXPRESS;Initial Catalog=EasyPersistDemo;User Id=EasyPersistDemo;Password=123123;Trusted_Connection=no";
private DataBaseObjectsFactorySQLServer _dao = new DataBaseObjectsFactorySQLServer(_connString);