Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
I have created project in which i have used Microsoft enterprise library concept.
For that I have created the following class library
1) Business Entities - For declaring the variables of tables
2) Business Logic - Where I have included the BusinessEntities reference for writing the functions for insert, update, delete and fetching the records
3) DAL - In which functions related to database are there.

Also I have created the WCF service application and implement that wcf servicein different class library

In that library i have added the business logic refrence.

By building that class library i have created the proxy class for that service which i have stored in different library.

Kindly give me the steps of coding when I am inserting, updating, deleting and fetching records from presentation layer that is web application.

I have created like this flow..just check it is right or not:
I have created the web application where i am calling this wcf service through proxy.In web application I have added Business Logic, Business Entities, WCFProxy reference.I am passing the entered value in the business entity class and calling the wcf service class but as i said i have not added business entity reference in that library so i have not get the object of that class.should i have to in clude business entity refrence in wcf service library because that refrece is alredy there in business logic and that business logic reference is there in wcf service..
please help me ..
If you have any sample regarding the insert, update and delete records using enterprise libray.then kindly share this or else suggest me the flow..
Posted

1 solution

Hi,

I am not too clear about your question, still as I understand you need one loosely coupled UI.

you are going through a right approach. still I explain it in sort

HTML
DAL (Data Access Layer) > BL ( Business Logic ) > BE ( Business Entity ) > WCF > Proxy Class > UI


if you want to create a high end app then don't use BE in front end because, someday you may need to change in Business Logic there for you need some additional data point's so you need to change BE but new data points have no impact on UI but you still need to redeploy the UI as you reffer BE from UI.

So create separate UI entity you can Name it ALL (Application Logic Layer).

Now How to Use CRUDE using WCF,

http://msdn.microsoft.com/en-us/library/orm-9780596520281-01-14.aspx[^]
 
Share this answer
 
v3
Comments
PrachiMhatre 7-Jan-13 2:44am    
Thanks for your quick response..

But how can I pass my form values..if i am not using the Business entity in front end..and in proxy class i am not refering the Business entity..so how can i pass value from front end to proxy class..should i have to include reference of business entity in proxyclass also?
Suvabrata Roy 7-Jan-13 7:14am    
You can but my Opinion would be to create a separate UI entity.

If want to do it in your way then you have to refer it in your Proxy class and UI.
Suvabrata Roy 7-Jan-13 3:33am    
Good One , Now you need AutoMapper (http://automapper.codeplex.com/)
Which will map you properties from your UI Entities to Business Entities
You can use it at WCF Or in New layer Call User Business Map...

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