Commit 88ca24ce authored by 黄奎's avatar 黄奎

页面修改

parent 2a93da36
......@@ -93,7 +93,7 @@ namespace Mall.CacheManager.Base
var dbNames = client.ListDatabases().ToList().Select(db => db.GetValue("name").AsString);
return dbNames.Contains(this.MongoConfig.DatabaseName);
}
catch(Exception ex) //如果连接的账号不能枚举出所有DB会报错,则默认为true
catch //如果连接的账号不能枚举出所有DB会报错,则默认为true
{
return true;
}
......@@ -268,6 +268,7 @@ namespace Mall.CacheManager.Base
/// <param name="col">集合</param>
/// <param name="indexFields">索引字段</param>
/// <param name="options"></param>
[Obsolete]
private void CreateIndex<TDoc>(IMongoCollection<TDoc> col, string[] indexFields, CreateIndexOptions options = null)
{
if (indexFields == null)
......@@ -297,6 +298,7 @@ namespace Mall.CacheManager.Base
/// <typeparam name="TDoc">泛型约束</typeparam>
/// <param name="indexFields">索引字段</param>
/// <param name="options"></param>
[Obsolete]
public void CreateCollectionIndex<TDoc>(string[] indexFields, CreateIndexOptions options = null)
{
CreateIndex(GetMongoCollection<TDoc>(), indexFields, options);
......@@ -308,6 +310,7 @@ namespace Mall.CacheManager.Base
/// <typeparam name="TDoc">泛型约束</typeparam>
/// <param name="indexFields">索引字段</param>
/// <param name="options"></param>
[Obsolete]
public void CreateCollection<TDoc>(string[] indexFields = null, CreateIndexOptions options = null)
{
this.Database.CreateCollection(this.MongoConfig.CollectionName);
......@@ -473,6 +476,7 @@ namespace Mall.CacheManager.Base
/// 清空集合对象
/// </summary>
/// <typeparam name="TDoc">泛型约束</typeparam>
[Obsolete]
public void ClearCollection<TDoc>()
{
var colleciton = GetMongoCollection<TDoc>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment