public SetupService() { _db = WebConfig.GetMongodb(); }
/// <summary> /// 获取Mongodb数据访问接口 /// </summary> /// <param name="controller"></param> /// <param name="database">要访问的数据库</param> /// <returns></returns> public static MongodbContext GetMongodb(this BaseController controller, string database = "") { return(WebConfig.GetMongodb(database)); }