Click here to Skip to main content
15,906,081 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
I would like to use interfaces in my asp.net webapplication by using Entityframwork and 3 tier architecture could u please suggest me how to maintain interfaces and which type of method i have to maintain interfaces?

Is it better approach that maintaining interfaces in application?
Posted
Comments
Jameel VM 10-Jan-14 4:45am    
What is the problem you are facing? what you are trying to achieve?
DGKumar 10-Jan-14 5:39am    
Hi could you please provide the some links for this approach i tried but i could not get better approach for this
mopicus 10-Jan-14 7:46am    
Here in CodeProject there is an explanation on Domain Driven Design approach
http://www.codeproject.com/Articles/56767/Domain-Driven-Design

1 solution

Kumar, I usually follow this approach :

Place domain classes and interfaces that the business logic must implement in an assembly, called Domain. This includes I[]Service and I[]Repository interfaces. The domain does not have any references to any other project. For example ICustomer, ICustomerRepository, ICustomerService.

On another assembly I put all the DB logic, and implement the IRepository interfaces, ICustomerRepository.

On another assembly I put all the Service logic, and implement the IService interfaces. ICustomerService. Services are the bridge between the db layer and the front end layer, which can be ASP.Net or MVC

I've found this approach in having layers very independent, and a code more maintenable.
Hope this helps!
 
Share this answer
 

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