public Semesters(ISemesterService semesterService) { viewModel = new SemestersViewModel(semesterService); InitializeComponent(); this.Loaded += SemestersTable_Load; }
async Task CallData() { var response = await _dataServices.GetSemestersAsync(); ViewModel = new SemestersViewModel(); ViewModel.Semesters = new List <Semester>(); if (response.Count > 0) { ViewModel.Semesters.AddRange(response); } }