Hello,
we are trying to set connection string dynamically with the datalayer of the appication. But we are facing problem with IDataSourceKeyResolver.
Here is the codesnippet of Metadata is given below, where we are not able to implement this method in our class. We are getting an error of IdeaBlade.Util.IDataSourceKey
====================================================================================
using System;
namespace IdeaBlade.Persistence
{
public interface IDataSourceKeyResolver
{
IdeaBlade.Util.IDataSourceKey GetKey(string pKeyName, string pKeyExtension);
}
}
====================================================================================
When we implement it we are getting an error given below:
====================================================================================
The type or namespace name 'IDataSourceKey' does not exist in the namespace 'IdeaBlade.Util' (are you missing an assembly reference?) ........\AppHelper\HEDataSourceKey.cs
* Reason is IDataSourceKey belongs to "IDEABLADE.UTIL.v4" not in "IDEABLADE.UTIL"
====================================================================================
If we change the implementation in the below manner:
Code Snippet
====================================================================================
IdeaBlade.Util.v4.IDataSourceKey GetKey(string pKeyName, string pKeyExtension)
{
String ConnectionStringNew = "Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=xxxx;Data
Source=xxxx\\serverhere";
IdeaBlade.Util.v4.IDataSourceKey objKey = new IdeaBlade.Rdb.v4.RdbKey(pKeyName, ConnectionStringNew);
return objKey;
}
====================================================================================
After the above changes now we are getting the error :
====================================================================================
Error 1 'AppHelper.HEDataSourceKey' does not implement interface member 'IdeaBlade.Persistence.IDataSourceKeyResolver.GetKey(string, string)'. 'AppHelper.HEDataSourceKey.GetKey(string, string)' cannot implement an interface member because it is not public. \AppHelper\HEDataSourceKey.cs 12 16 AppHelper
====================================================================================
Please reply for this issue as early as possible.