Consider the following example.
I need to check if a CouponModel has a unique serial key.
I have two choices:
CouponModel model = GetFromSomewhere();
if (!CouponHasUniqueKey(model))
{
}
//or
if (!CouponHasUniqueKey(model.SerialKey))
{
}
Of course in the method where I pass in the whole object I would have to access the string property instead of working directly with the string.
Which option is better and why?