/// <summary> /// Gets the list of roles. /// </summary> /// <returns>The list of roles.</returns> protected override RoleList DoGetRoleList() { MongoCollection<BsonDocument> collection = this.database.GetCollection(iApplyDb.Role._COLLECTION_NAME); MongoCursor<BsonDocument> documents = collection.FindAll(); if (documents == null) { return new RoleList(); } RoleList roles = new RoleList(); roles.AddRange(documents.Select(document => BsonConverter.ConvertToObjectViaJson<Role>(document))); return roles; }