示例#1
0
        private async Task TestSelects()
        {
            List <Lesson> actualLesson = await lessonStorage.GetAllLesson();

            for (int i = 0; i < listLesson.Count; i++)
            {
                Assert.Contains(listLesson[i], actualLesson);
            }

            Lesson actual = await lessonStorage.GetLessonById((int)listLesson[0].Id);

            Assert.AreEqual(listLesson[0], actual);
        }
示例#2
0
        public async Task <ActionResult <List <LessonOutputModel> > > LessonGetAll()
        {
            List <Lesson> lessons = await lessonStorage.GetAllLesson();

            return(Ok(LessonMapper.ToOutputModels(lessons)));
        }