Ejemplo n.º 1
0
 /// <summary>
 /// 通过group名获取MongoClent
 /// </summary>
 /// <param name="groupName">组名</param>
 /// <param name="client">clent</param>
 /// <returns>是否存在</returns>
 public static bool GetClentByGroupName(string groupName, out SunMongoClient client)
 {
     if (clientsDict.Count == 0)
     {
         var db = MongoDbClient;
     }
     return(clientsDict.TryGetValue(groupName, out client));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 通过group名获取MongoClent
 /// </summary>
 /// <param name="groupName">组名</param>
 /// <param name="client">clent</param>
 /// <returns>是否存在</returns>
 public static bool GetClentByGroupName(string groupName, out SunMongoClient client)
 {
     if (clientsDict.Count == 0)
     {var db=MongoDbClient; }
     return clientsDict.TryGetValue(groupName,out client);
 }