Hello All,
Does the given code samples perform same operation? Do i really need a EXTRA object instantiation code? Will there be any issue with the first code segment?
Sample 1
Dog adog= new Dog();
adog.ID = dogID;
adog.CategoryId= dogCategoryId;
adog= DogRepository.FindDogByCategoryId(adog);
Assign the values back to the same object
Sample 2
Dog adog= new Dog();
adog.ID = dogID;
adog.CategoryId= dogCategoryId;
Dog odog= DogRepository.FindDogByCategoryId(adog);
Assign the values to a different object