Book Review : Pro Business Applications with Silverlight 4 by Chris Anderson

Pro Business Applications with Silverlight 4Pro Business Applications with Silverlight 4 by Chris Anderson
My rating: 5 of 5 stars

It is surely one of the best books on business application development with Silverlight.

It starts with basics of Silverlight and XAML.

Then it gradually covers the important topics like Navigation Framework, WCF RIA Services, MVVM, OOB Mode etc.

It covers almost every aspect of developing a business application.

I don’t think there is any other book that explains this topic in such great detail.

I will highly recommend this book.

View all my reviews


Using Deep Insert (creating multiple new records in the same operation) in Silverlight (CRM 2011)


Sharing a basic example using which we can create Parent entity and the related entity records in the same operation\

Check out this helpful post

public MainPage()

GGContext context;

private void UserControl_Loaded(object sender, RoutedEventArgs e)
 var orgServiceUrl = "http://servername/orgname/XRMServices/2011/OrganizationData.svc";

 // initialize the context
 context = new GGContext(new Uri(orgServiceUrl));

// using client http stack
 context.HttpStack = System.Data.Services.Client.HttpStack.ClientHttp;
 context.UseDefaultCredentials = false;
 context.Credentials = new NetworkCredential("administrator", "password", "domain");
 // create contact record
 Contact contact = new Contact();
 contact.LastName = "Rana";
 contact.FirstName = "Nisha";

 // create two tasks and one email activity
 var myTask1 = new Task();
 myTask1.Subject = "Task1 created at " + DateTime.Now.ToLongTimeString();
 var myTask2 = new Task();
 myTask2.Subject = "Task2 created at " + DateTime.Now.ToLongTimeString();
 var myEmail = new Email();
 myEmail.Subject = "Email created at " + DateTime.Now.ToLongTimeString();

// add the tasks and email to their respective set

// add contact to be created to the contact set

// add the related records

 // add the link
 context.AddLink(contact, "Contact_Tasks", myTask1);
 context.AddLink(contact, "Contact_Tasks", myTask2);
 context.AddLink(contact, "Contact_Emails", myEmail);

context.BeginSaveChanges(CreateContactHandler, contact);
 private void CreateContactHandler(IAsyncResult result)
 // in the call back method call the EndSaveChanges method
 // it returns DataServiceResponse object.
 // we can get the error information from this object in case an operation fails
 // id of the created contact record
 Guid createdContactGuid = ((Contact)result.AsyncState).ContactId;

Hope it helps