views:

30

answers:

0

In the model I currently have an interface as such:

public interface IAmAnAssessment
{
 int AssessmentId { get; set; }
 string UserName { get; set; }
 string DefectCode { get; set; }
 string AssociateSeverity { get; set; }
 string ShareholderSeverity { get; set; }
 string CustomerSeverity { get; set; }
 string RegulatorySeverity { get; set; }
 int RootCauseId { get; set; }
 IEnumerable<int> AssessmentInvestors { get; }
}

Where each employee will be ranking how severe each defect type for a loan is. AssessmentInvestors is a selection of Freddie Mac, Fannie Mac, etc. represented by a checkboxlist.

The property is core to an assessment but I'm lost as to how I would implement this part of the interface on my Linq-To-Sql persistance layer while avoiding database-driven-design. The inMemoryRepositories could clearly handle it.

This is my SQL for the table that represents that property:

create table DefectSeverity.AssessmentToInvestor(
   AssessmentId int 
references defectseverity.assessment(assessmentId),
   zInvestorId int
references defectseverity.zInvestor(zInvestorId),
   primary key(assessmentId,zInvestorId)

)