Example #1
0
 public SetupService()
 {
     _db = WebConfig.GetMongodb();
 }
Example #2
0
 /// <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));
 }