async Task <IEnumerable <SubjectGroupCount> > FetchSubjectGroupCount() { var sqlString = StatystykaSQL.CountGroupMember(UserSession.User.Settings.SchoolID.ToString(), UserSession.User.Settings.SchoolYear); using (var scope = AppSession.TypeContainer.BeginLifetimeScope()) { var dbs = scope.Resolve <IDataBaseService>(); return(await dbs.FetchRecordSetAsync(sqlString, (R) => new SubjectGroupCount { ClassID = Convert.ToInt32(R["Klasa"]), Count = Convert.ToInt32(R["StanGrupy"]), SubjectID = Convert.ToInt32(R["IdPrzedmiot"]), SubjectIdBySchool = Convert.ToInt32(R["IdSzkolaPrzedmiot"]) })); } }
async Task <IEnumerable <SchoolStudent> > FetchStudent() { var sqlString = StatystykaSQL.CountGroupMember(UserSession.User.Settings.SchoolID.ToString(), UserSession.User.Settings.SchoolYear); using (var scope = AppSession.TypeContainer.BeginLifetimeScope()) { var dbs = scope.Resolve <IDataBaseService>(); return(await dbs.FetchRecordSetAsync(sqlString, (R) => new SchoolStudent { Student = new IdentUnit { ID = Convert.ToInt32(R["IdUczen"]), Name = R["Student"].ToString() }, ActivationStatus = Convert.ToBoolean(R["StatusAktywacji"]), StudentClass = new IdentUnit { ID = Convert.ToInt32(R["IdKlasa"]), Name = R["NazwaKlasy"].ToString() } })); } }