public QuestionTag Save(QuestionTag questionTag)
 {
     var questionTagsList = mongoDatabase.GetCollection("QuestionTags");
     WriteConcernResult result;
     bool hasError = false;
     if (string.IsNullOrEmpty(questionTag._Id))
     {
         questionTag._Id = ObjectId.GenerateNewId().ToString();
         result = questionTagsList.Insert<QuestionTag>(questionTag);
         hasError = result.HasLastErrorMessage;
     }
     else
     {
         IMongoQuery query = Query.EQ("_id", questionTag._Id);
         IMongoUpdate update = Update
             .Set("Tag", questionTag.Tag.TagName);
         result = questionTagsList.Update(query, update);
         hasError = result.HasLastErrorMessage;
     }
     if (!hasError)
     {
         return questionTag;
     }
     else
     {
         throw new Exception("");
     }
 }
        public void SaveTest()
        {
            var questionTag = new QuestionTag
            {
                Tag = new Tag { TagName = "MongoDB" }
            };

            var data = repository.Save(questionTag);

            //Xunit.Assert.NotNull(data);
            Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsNotNull(data);
        }