이 메서드를 ISchoolclassCodeRepository 또는 ISchoolclassService에 넣어야합니까?이 논리를 리포지토리 또는 서비스에 넣기
/// <summary>
/// The client passes newly created and existing schoolclass codes.
/// The newly created schoolclass codes are returned.
/// </summary>
/// <param name="newAndExistingSchoolclassCodes">All schoolclass codes and the newly created by the user</param>
/// <param name="schoolyearId">The related schoolyear for a schoolclass code</param>
/// <returns>The newly created schoolclass codes</returns>
public IEnumerable<SchoolclassCode> GetNewCreatedSchoolclassCode(IEnumerable<SchoolclassCode> newAndExistingSchoolclassCodes, int schoolyearId)
{
var existingSchoolclassCodes = _uniOfWork.SchoolclassCodeRepository.GetSchoolclassCodes(schoolyearId).ToList();
var newSchoolclassCodes = existingSchoolclassCodes.Except(newAndExistingSchoolclassCodes,new SchoolclassCodeComparer());
return newSchoolclassCodes;
}
예. 예배 드리겠습니다. 리포지토리에는 서비스 내에서 호출되는 FetchById 메서드가 있습니다. 여기서는 물건을 제외하고 linq을 수행합니다. – Pascal