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

Solution


Now let's take a look at the solution.

Implementing the database

First let's take a look at what tables are needed:

Moderations

The moderation table shown in the following screenshot holds the SystemObjectID and SystemObjectRecordID as well as the Account that created the content in question. It also carries the Account that executed the resulting action as well as what that action is.

In addition to tables, we are going to need a way to quickly and easily determine if a bit of content has been flagged or not. I hate to say it boys and girls, but we are going to dip into the actual SQL for this one. We will create a function that will take a SystemObjectID and a SystemObjectRecordID and determine if that item is flagged or not.

create function [dbo].[IsFlagged]
(
	@SystemObjectID int,
	@SystemObjectRecordID bigint
)
returns bit 

as
begin
	declare @result bit
	if exists (
		select 1 
		from moderations 
		where systemobjectid = @SystemObjectID and 
			systemobjectrecordid = @SystemObjectRecordID...
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