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

页面修改

parent 2a93da36
...@@ -93,7 +93,7 @@ namespace Mall.CacheManager.Base ...@@ -93,7 +93,7 @@ namespace Mall.CacheManager.Base
var dbNames = client.ListDatabases().ToList().Select(db => db.GetValue("name").AsString); var dbNames = client.ListDatabases().ToList().Select(db => db.GetValue("name").AsString);
return dbNames.Contains(this.MongoConfig.DatabaseName); return dbNames.Contains(this.MongoConfig.DatabaseName);
} }
catch(Exception ex) //如果连接的账号不能枚举出所有DB会报错,则默认为true catch //如果连接的账号不能枚举出所有DB会报错,则默认为true
{ {
return true; return true;
} }
...@@ -268,6 +268,7 @@ namespace Mall.CacheManager.Base ...@@ -268,6 +268,7 @@ namespace Mall.CacheManager.Base
/// <param name="col">集合</param> /// <param name="col">集合</param>
/// <param name="indexFields">索引字段</param> /// <param name="indexFields">索引字段</param>
/// <param name="options"></param> /// <param name="options"></param>
[Obsolete]
private void CreateIndex<TDoc>(IMongoCollection<TDoc> col, string[] indexFields, CreateIndexOptions options = null) private void CreateIndex<TDoc>(IMongoCollection<TDoc> col, string[] indexFields, CreateIndexOptions options = null)
{ {
if (indexFields == null) if (indexFields == null)
...@@ -297,6 +298,7 @@ namespace Mall.CacheManager.Base ...@@ -297,6 +298,7 @@ namespace Mall.CacheManager.Base
/// <typeparam name="TDoc">泛型约束</typeparam> /// <typeparam name="TDoc">泛型约束</typeparam>
/// <param name="indexFields">索引字段</param> /// <param name="indexFields">索引字段</param>
/// <param name="options"></param> /// <param name="options"></param>
[Obsolete]
public void CreateCollectionIndex<TDoc>(string[] indexFields, CreateIndexOptions options = null) public void CreateCollectionIndex<TDoc>(string[] indexFields, CreateIndexOptions options = null)
{ {
CreateIndex(GetMongoCollection<TDoc>(), indexFields, options); CreateIndex(GetMongoCollection<TDoc>(), indexFields, options);
...@@ -308,6 +310,7 @@ namespace Mall.CacheManager.Base ...@@ -308,6 +310,7 @@ namespace Mall.CacheManager.Base
/// <typeparam name="TDoc">泛型约束</typeparam> /// <typeparam name="TDoc">泛型约束</typeparam>
/// <param name="indexFields">索引字段</param> /// <param name="indexFields">索引字段</param>
/// <param name="options"></param> /// <param name="options"></param>
[Obsolete]
public void CreateCollection<TDoc>(string[] indexFields = null, CreateIndexOptions options = null) public void CreateCollection<TDoc>(string[] indexFields = null, CreateIndexOptions options = null)
{ {
this.Database.CreateCollection(this.MongoConfig.CollectionName); this.Database.CreateCollection(this.MongoConfig.CollectionName);
...@@ -473,6 +476,7 @@ namespace Mall.CacheManager.Base ...@@ -473,6 +476,7 @@ namespace Mall.CacheManager.Base
/// 清空集合对象 /// 清空集合对象
/// </summary> /// </summary>
/// <typeparam name="TDoc">泛型约束</typeparam> /// <typeparam name="TDoc">泛型约束</typeparam>
[Obsolete]
public void ClearCollection<TDoc>() public void ClearCollection<TDoc>()
{ {
var colleciton = GetMongoCollection<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