locked
what is the difference between AddToContactSet and AddObject RRS feed

  • Question

  • Hi, 

    Can anyone explain, what is the difference between following those?

    Approach 1

    	    _context.AddToContactSet(contactToBeAdded);
     

    Approach 2

                _context.AddObject("ContactSet", contactToBeAdded);
                _context.SaveChanges();

    Many thanks

    Friday, July 26, 2013 3:26 PM

All replies

  • The AddToContactSet is simply a shortcut function that is generated when you create an early bound Service Context. 

    hth


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Monday, July 29, 2013 8:07 AM
    Answerer