May 28, 2009 at 2:43 PM
Edited May 28, 2009 at 3:01 PM
I have downloaded the Latest Repository factory code and Build it into VS2008. I have used the Repository DLLs in my C# Web application. When I run the project I am Getting error
"Exception of type 'System.Configuration.ConfigurationErrorsException' was thrown."
on the followiong Line
ISRiskTypeRepository RiskTypeRepository = RepositoryFactory.Create<ISRiskTypeRepository>();
I have tried it with Passing in Connection String as well, Like following
ISRiskTypeRepository RiskTypeRepository = RepositoryFactory.Create<ISRiskTypeRepository>("SConnection");
and I have checked the Repository entries in the web.config File, They all seems to be there.
when I Debug using the source Code it breaks at the folowing line
Type repositoryType = Type.GetType(element.RepositoryType);
I follow the steps
- Download & Install the Enterprise Library 4.1
- Download and Build the Repositiry Factroy Source Code in VS 2008
- Create New solution with one C# Web Project in it (S.Web) and Two Class Lib projects C# (BLL & DAL)
- Enable Repository factory
- Add Conncetion string (SQL server 2005) using Enterprose GUI for Connection
- Create CRUD Stored Procs using Repository (On DAL Project)
- Create Business Entitites (On BLL Project)
- Create Data Repository Classes using Business entities (DAL Project)
- Use the code above and Build the Solution
Result: the Above error
Also Parameters and Class properties are not always mapped correctly !! for example StoreID & ID are two separate fields but data repository Class will have both of them as ID two times !!
What I am doing wrong ??