Example #1
0
        public AnswerDB AnswerToDB(Answer item)
        {
            AnswerDB result = new AnswerDB();

            result.Id         = item.Id;
            result.Text       = item.Text;
            result.ExternalId = item.ExternalId;
            result.IsCorrect  = (int)BoolToInt(item.IsCorrect);

            return(result);
        }
Example #2
0
        public Answer DBToAnswer(AnswerDB item)
        {
            Answer result = new Answer();

            result.Id         = item.Id;
            result.Text       = item.Text;
            result.ExternalId = item.ExternalId;
            result.IsCorrect  = (bool)IntToBool(item.IsCorrect);

            return(result);
        }