problem in saving an entity

Posts   
 
    
k
User
Posts: 1
Joined: 16-Mar-2006
# Posted on: 16-Mar-2006 17:37:17   

I am trying to save a simple entity. Code looks like this:

Tbl1Entity e1 = new Tbl1Entity(); e1.Id = 3; e1.Name = "Name 3"; e1.IsNew = true;

e1.Save();

I get "An unhandled exception of type 'System.ExecutionEngineException' occurred in mscorlib.dll."

"Additional information: Object reference not set to an instance of an object."

As you can say I am new to LLBLGen. I have copied appSetting from LLBL generated app.config to my project app.config.

I have the following code that works just fine.. It loads the data from database..

                                        /***************************************/
        Tbl1Entity tbl1 = new Tbl1Entity(1);
        ArrayList arr = tbl1.GetMemberEntityCollections();

        Tbl2Collection col = tbl1.GetMultiTbl2(true);

            foreach (Tbl2Entity t in col)
            {
                string s = t.Desc;
            }

        /**************************************/

I wanted to try save() method that takes two parameters IPredicate updateRestriction and recurse. Could you let me know how do I use IPredicate???

Thank you

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 17-Mar-2006 02:55:12   

Can you post your config file with the settings you don't want to share xxxxx out? What are you trying to do with the save?