public QuestionModel(UrlHelper urlHelper, Question question) { Url = urlHelper.Link("questions", new { id = question.Id}); Id = question.Id; QuestionText = question.QuestionText; QuestionCategoryId = question.CategoryId; ImageBytes = question.Image; IsDeprecated = question.Deprecated; }
public QuestionModel Create(Question question) { return new QuestionModel(_urlHelper, question); }