Ejemplo n.º 1
0
        public LessonEntity toEntity(LessonCreateRequest request)
        {
            LessonEntity entity = new LessonEntity();

            entity.Ename = request.Ename;
            entity.Title = request.Title;

            return(entity);
        }
Ejemplo n.º 2
0
        public LessonCreateResponse Create([FromBody] LessonCreateRequest request)
        {
            LessonCreateResponse response = new LessonCreateResponse();

            lessonRepository.Create(lessonConvertor.toEntity(request));

            response.Status = 1;
            return(response);
        }