Posted on: 9/12/2013 10:16:23 PM | Views : 612

Hi everybody,
I would like to share my style of organizing my code (I think I learned it from ASP.net Pet Store sample app) and would like to get your suggestions. 
I have SQLServerDAL sub-project for sql operations and I use also sqlhelper class.  To give you an example, if I am gonna return the list of student objects (i.e., List<StudentInfo > students), I have two methods:
public StudentInfo GetStudent(Guid studentId) {      StudentInfo s = new StudentInfo();      s.Name = reader.getString(0);      return s; }
public List<StudentInfo> GetStudents(Guid studentId) {     List<StudentInfo> studentlist;     while(reader.read())//This just returns the ids of students     {           StudentInfo s = ne ...

Go to the complete details ...