public static ChangeMajorViewModel Create(IRepository repository, IMajorService majorService, Registration registration, IList<Ceremony> ceremonies)
        {
            Check.Require(repository != null, "Repository is required.");

            var viewModel = new ChangeMajorViewModel()
                                {
                                    MajorCodes = majorService.GetMajors(),
                                    Student = registration.Student,
                                    Registration = registration,
                                    Ceremonies = ceremonies
                                };

            return viewModel;
        }
Beispiel #2
0
 public async Task <ActionResult <List <MajorDataset> > > GetMajors(string lang = "vi")
 {
     return(await _majorService.GetMajors(lang));
 }