public HelloObject GetHelloObject(string id) { HelloObject helloObject = new HelloObject(); if (Int32.Parse(id) > 0) { helloObject.happyHello = true; helloObject.helloMessage = "Great day to be alive"; } return(helloObject); }
public HelloObject GetObjectModel(string id) { if (id == null) { throw new ArgumentNullException("composite"); } HelloObject helloObject = new HelloObject(); if (Int32.Parse(id) < 0) { helloObject.happyHello = false; helloObject.helloMessage = "I am not well :-("; } else { helloObject.happyHello = true; helloObject.helloMessage = "I am very happy, thank you"; } return(helloObject); }