public LessonEntity toEntity(LessonCreateRequest request) { LessonEntity entity = new LessonEntity(); entity.Ename = request.Ename; entity.Title = request.Title; return(entity); }
public LessonCreateResponse Create([FromBody] LessonCreateRequest request) { LessonCreateResponse response = new LessonCreateResponse(); lessonRepository.Create(lessonConvertor.toEntity(request)); response.Status = 1; return(response); }