Exemplo n.º 1
0
        public static List <RequirementViewModel> ReverseMapSubjects(List <Requirement> subjects)
        {
            var subjectViewModel = new RequirementViewModel();

            return(subjects.Select(subject => subjectViewModel.ReverseMap(subject)).ToList());
            //return subjects.Select(subjectViewModel.ReverseMap).ToList();
        }
Exemplo n.º 2
0
 public SponsorshipViewModel SingleSponsorshipMap(Sponsorship sponsorship)
 {
     ID                    = sponsorship.ID;
     SponsorId             = sponsorship.SponsorId;
     Name                  = sponsorship.Name;
     Description           = sponsorship.Description;
     StartingDate          = sponsorship.StartingDate;
     ClosingDate           = sponsorship.ClosingDate;
     EssayRequired         = sponsorship.EssayRequired;
     SponsorshipValue      = sponsorship.SponsorshipValue;
     StudyFields           = sponsorship.StudyFields;
     Province              = sponsorship.Province;
     AverageMarkRequired   = sponsorship.AverageMarkRequired;
     EducationLevel        = sponsorship.EducationLevel;
     InstitutionPreference = sponsorship.InstitutionPreference;
     GenderPreference      = sponsorship.GenderPreference;
     RacePreference        = sponsorship.RacePreference;
     DisabilityPreference  = sponsorship.DisabilityPreference;
     ExpensesCovered       = sponsorship.ExpensesCovered;
     TermsAndConditions    = sponsorship.TermsAndConditions;
     SponsorshipType       = SponsorshipType;
     NumberOfViews         = sponsorship.NumberOfViews;
     AgeGroup              = sponsorship.AgeGroup;
     Rating                = sponsorship.Rating;
     Requirements          = RequirementViewModel.ReverseMapSubjects((List <Requirement>)sponsorship.Requirements);
     return(this);
 }