Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying ASP.NET 3.5 Social Networking
  • Table Of Contents Toc
ASP.NET 3.5 Social Networking

ASP.NET 3.5 Social Networking

By : Andrew Siemer
4.1 (10)
close
close
ASP.NET 3.5 Social Networking

ASP.NET 3.5 Social Networking

4.1 (10)
By: Andrew Siemer

Overview of this book

Table of Contents (19 chapters)
close
close

Repository pattern and LINQ


Earlier we had a high-level discussion on repositories. Now we are ready to dig in a little deeper. We know that repositories are all about providing a way for our domain logic to access resources in the outside world. We know that they can be used for web services, XML files, and just about anything else. In our case, we will discuss how to access data in a database using the new LINQ to SQL framework.

We haven't really touched upon anything related to the Fisharoo application so far, which means that we don't really have anything in the database for us to play with just yet. For that reason, I created a simple Person table for us to work with. It has the following fields: PersonID, FirstName, LastName, and Email. I then created four entries in the database for us to work with.

CREATE TABLE [dbo].[Person](
   [PersonID] [int] IDENTITY(1,1) NOT NULL,
   [FirstName] [varchar](30) NULL,
   [LastName] [varchar](30) NULL,
   [Email] [varchar](150) NULL
) ON [PRIMARY...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
ASP.NET 3.5 Social Networking
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon