I want to use this query in entity framework.
[HttpGet]
public object getFrequencyQuestionData()
{
var connectionString = "mongodb://localhost:27017";
MongoClient client = new MongoClient(connectionString);
MongoServer server = client.GetServer();
MongoDatabase db = server.GetDatabase("FormDataBase");
MongoCollection collection = db.GetCollection<Blog>("FrequencyQuestionForm");
// Here i want to call that query ..
MongoCursor<Blog> cursor = collection.FindAllAs<Blog>();
var count = collection.Count();
string document = cursor.ToJson();
JToken token = JToken.Parse(document);
var jObject = JObject.FromObject(new { formdata = token, count });
return jObject;
}