Click here to Skip to main content
15,883,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have A Interface
<br />
public interface ICountryDataService<br />
   {<br />
   void CountryDataService_Save(ICountry country);<br />
   }<br />


And implement in a Class
<br />
class CountryDataService : DataServiceBase, ICountryDataService<br />
    {<br />
        public CountryDataService()<br />
        {<br />
        }<br />
<br />
<br />
        public CountryDataService(IDbTransaction txn)<br />
            : base(txn)<br />
        {<br />
        }<br />
<br />
public void CountryDataService_Save(ICountry country)<br />
        {<br />
Throw Not Implemented Exception;<br />
        }<br />
<br />
    }<br />


And Just Want to register

C#
<br />
  public static class DataServiceContainer<br />
   {<br />
       public static void InitializeContainer(IUnityContainer container)<br />
       {<br />
           if (container == null)<br />
               throw new ArgumentNullException("container");          <br />
           container.RegisterType<ICountryDataService, CountryDataService>();<br />
       }<br />
   }

And resolve on the basis of parameter or without parameter ,
But this gives Error , Please help... :-(
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900