I have a DAL-BLL question. Basically, I have a some information that im splitting into two tables. Eg. I have a GradeMetadata table and a Students Table. The students table consists of all the students in a school, but it also has a field for the GradeMetada ID, so that way I can track of which kid is in which Grade.
now in my DAL, I have a
GradeDetails class and a StudentDetails class.
namespace DAL { GradeDetails has the following properties: id, gradeName, and a List<studentDetails>
StudentDetails has the following properties id, studentName, age (in my insert logic I also populate a column which ahs the gradeDetails id.) }
now in my BLL I inititially had a Grade class as follows:
using DAL; namespace BLL { Grade has the following properties Id, GradeName, List<studentDetails> }
During normal usage, I would only want to use using BLL, but what I came to realise is that if I have to create a studentDetails object to pass into Grade..I cant do that cause there is no definition for a studentDetails in BLL.
So I created a StudentDetails class inside the Grades class like so: namespace BLL{ class Grade { Id, GradeName, List<studentDetails>
class Students Id, StudentName, Age }
}
but I keep getting this error that in my insertlogic cannot convert from <BLL.Grade.Students> to <DAL.StudentDetails>
this seems like a valid error message because the compiler doesnt know that the List<studentDetails> and List<Grade.Students> has the identical structure...so how would I get around this?
thanksYou are so wise...like a miniature budha covered in fur. -Anchorman
Moved byMichael Sun [MSFT]Microsoft employeeWednesday, October 15, 2008 8:48 AMOff Topic for Visual C# General [loc] (Moved from Visual C# General to Off-Topic Posts (Do Not Post Here))