Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get the name of the databaseSets
Message
From
20/03/2009 09:14:18
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01388393
Message ID:
01389955
Views:
28
In the event you are looking for ideas, one way to do this would be to create an application level DatabaseManager class subclassed from the mmDatabaseManager and adding the method you need. Then override the CreateDatabaseManager method in your application factory to create your application level database manager class.
using OakLeaf.MM.Main.Managers;

namespace MyCompany.MyApplication.NamespaceName
{
     public class ADatabaseManager : mmDatabaseManager
     {
	/// <summary>
	/// Returns the Name of the specified DatabaseSet
	/// </summary>
	/// <param name="key">DatabaseSet Key Name</param>
	/// <returns>String name of the database set</returns>
	public string GetDatabaseSetName(string key)
	{
                           // My code to return the name
	}
     }
}

Then in your app factory

public override mmDatabaseManager CreateDatabaseManager()
{
     return new ADatabaseManager();
}
>Tim,
>
>Yeah I looked through the code and did not find a method for this, so I guess I need to add one. Thanks again for taking the time to research this.
>
>Kind Regards,
>
>Mat
>
>>
>>DatabaseSetKey is a Read/ Write property so you can both set it and retrieve what is in there. This probably doesn't return the string you show so I would suggest you open the MM Framework solution or just do File| Open| File and open the mmDatabaseManager.cs file and look through the methods that are there. Several work with the database keys and if you don't find what you want there is enough of examples to write some code to get what you want. None of those methods require more than a few lines of code to extract data from the config files. Also you might look at mmAppSettingsManager.cs since there is good stuff in there also.
>>Tim
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform