using MongoDB.Bson;
using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LolDataRequestLib.ResponseData
{
    internal abstract class AResponseData : IResponseData
    {


        protected MongoClient mDBClient = new MongoClient(DBDefine.MONGODB주소);

        protected IMongoDatabase mEventDataBase = null;

        public DataTable 디비데이터를데이터테이블로만듬() {

            mEventDataBase = mDBClient.GetDatabase("datalol");

            return buildDataForResponse(getDataFromMongo());

        }

        protected abstract BsonDocument getDataFromMongo();

        protected abstract DataTable buildDataForResponse(BsonDocument recvDocument);

    }
}
