Question: Suppose I have an object that looks like this:

```
public class SomeObjectModel
{
   long TheLong {get; set;}
   public string TheString {get; set;}
}

```

At some point in my code, I pass some of the properties of this object into a function:

```
public void SomeFunction(long LongParameter, string StringParameter) { ... }

```

What's the difference, if any, between passing in parameters like this versus refactoring the function to take in SomeObjectModel directly like this:

```
public void SomeFunction(SomeObjectModel TheObject)
{
    long LongParameter = TheObject.TheLong;
    string StringParameter = TheObject.TheString;
}

```

Is there's a difference between the two approaches? Is there a recommended approach?

Answer: 
This *really* depends on the actual domain of the problem.

But according to the Law of Demeter (or principle of least knowledge), you should pass as less information as possible.

This promotes loose coupling - the implementation will simply depend on `long` and `string`, instead of depending on `long`, `string` *aaaand* `SomeObjectModel`.
The difference is in extensibility. Adding model properties doens't lead to modifying method signature.