I am new to solid principle. I think i'm violating this kind of implementation:
class Students{
public void Save(int id){
if(id !== 0){
//add students here...
}else{
//edit student details here...
}
}
}
There are many instances that you call different functionalities in one method. Is this right? or if not, please answer sample code. Thank You