New Posts New Posts RSS Feed: To get the New
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

To get the New

 Post Reply Post Reply
Author
viralvasaiwala View Drop Down
Newbie
Newbie
Avatar

Joined: 08-Jun-2008
Location: India
Posts: 5
Post Options Post Options   Quote viralvasaiwala Quote  Post ReplyReply Direct Link To This Post Topic: To get the New
    Posted: 14-Jul-2008 at 11:53pm
 
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.
 
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 15-Jul-2008 at 10:11am
Are you writing a DevForce EF application or a "hybrid" DEF-WinForms application?  In either case, you don't need the IdeaBlade.Persistence.* assemblies.
 
In DEF, the IDataSourceKeyResolver is part of the IdeaBlade.EntityModel.v4 namespace.    Also, although the RdbKey was retained for legacy purposes in DEF, it is not used internally by the framework.  You should be returning an EdmKey from the IDataSourceKeyResolver implementation.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down