public static Response ToServiceModel(this ResponseBindingModel model)
        {
            var responseModel = new Response
            {
                Id         = model.Id,
                OptionId   = model.OptionId,
                QuestionId = model.QuestionId,
                ReportId   = model.ReportId
            };

            return(responseModel);
        }
Пример #2
0
        public static ResponseBindingModel ToViewModel(this Response model)
        {
            var responseModel = new ResponseBindingModel
            {
                Id         = model.Id,
                Option     = model.Option?.ToViewModel(),
                OptionId   = model.OptionId,
                Question   = model.Question?.ToViewModel(),
                QuestionId = model.QuestionId,
                ReportId   = model.ReportId
            };

            return(responseModel);
        }