Пример #1
0
        public static LessonUpdateDetails GetLessonDetails(IUnitOfWorkCryptoLearn _unitOfWork, Lesson lesson, int langId)
        {
            IUnityContainer container = new UnityContainer();
            var updatedLesson = container.Resolve<LessonUpdateDetails>();

            updatedLesson.Id = lesson.Id;
            updatedLesson.LessonName = lesson.LessonName;
            updatedLesson.SectionId = lesson.SectionId;
            updatedLesson.ReadDuration = lesson.ReadDuration;
            updatedLesson.LessonDescriptions = _unitOfWork.LessonDescriptions.GetLessonDescription(lesson.Id, langId);
            updatedLesson.AddTime = lesson.AddTime;
            updatedLesson.ImageURL = (_unitOfWork.Images.GetImage(x => x.Id == lesson.ImageId) == null) ? "" : _unitOfWork.Images.GetImage(x => x.Id == lesson.ImageId).ImageURL;
            updatedLesson.Questions = _unitOfWork.LessonQuestionsDetails.GetLessonQuestionsWithDetails(lesson.Id, langId).Questions;

            return updatedLesson;
        }
 public LessonDescriptionController(IUnitOfWorkCryptoLearn unitOfWork)
 {
     this._unitofwork = unitOfWork;
 }
 public LessonUpdateController(IUnitOfWorkCryptoLearn unitOfWork)
 {
     this._unitOfWork = unitOfWork;
 }
 public LessonLikeViewController(IUnitOfWorkCryptoLearn unitOfWork)
 {
     this._unitOfWork = unitOfWork;
 }
Пример #5
0
 public DeviceController(IUnitOfWorkCryptoLearn unitOfWork)
 {
     this._unitOfWork = unitOfWork;
 }