Database Acess in Modelling Edition

May 1, 2009 at 7:00 PM

I am using Service Factory: Modelling Edition in VS.NET 2008. My requirement is to insert/update/delete opeartions by connecting to SQL Database. I hope its not a good practice to put the code in service implementation class to do this.
As i was going throug the discussions, it appeared like i need to use Repository Factory but i guess that was developed in VS.NET 2005.

Can i anyone guide me in achieving my functionality to use database operations in VS.NET 2008 WSSF modelling edition?

May 4, 2009 at 1:22 PM
You can apply any of the LINQ "variants"out there and/or take a look at these links:

App Arch. Guide and DAL How To:

.NET StockTrader Sample App (shows some DAL implementation with NET 3.5)
May 4, 2009 at 2:02 PM
Actually, I created my services in WSSF. Business Entities, Business Logic and Data Access projects are empty.
Now i want to insert a record into database from service layer. I want to write a method to achieve this which can be called from client.
To do this i think i need to create repostiory, factory etc. but am not sure how to do this.

Since, Repository Factory has been removed from WSSF, can you guide me how should i proceed step by step to achieve my functionality in WSSF?

May 4, 2009 at 10:48 PM
Hey Naveen,

Because of the recommended coupling between layers, building the data access layer (DAL) is an unrelated exercise to using the Service Factory. There are a number of different approaches and strategies for building the DAL that depend on things like the application, the team, and the data model.

The patterns & practices team is currently working on a project that will provide data access guidance, but we won't be able to release any code for a few more weeks. Monitor to follow the project. There isn't much up there now, but that will change in a few weeks. In the meantime, I recommend you read Martin Fowler's Patterns of Enterprise Application Architecture for a better understanding of DALs and enterprise architecture in general.

I hope this helps,