I have a method in businessservice as follows,
public void ProcessModelId(int modelId){
//method logic for a modelid....
}
Now the requirement is to send list of ids, so should i modify existing method or can i overload another method wit list of ids? like below?
public void ProcessModelIds(List<int> modelIds){
foreach(var i in modelIds){//method logic for each modelid....}
}
which one is correct way in design perspective? or that doesn't matter?
Aucun commentaire:
Enregistrer un commentaire