یه مثال بزن تا راجع اون بحث کنیم
برای مثال قسمتی از کد CommunityServer:
از فایل WeblogSqlDataProvider.cs
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
// Copyright (c) Telligent Systems Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Data;
using System.Data.SqlClient;
using CommunityServer.Blogs; //کلاس لایه Business Logic
using CommunityServer.Blogs.Components; //کلاس لایه Business Logic
using CommunityServer.Components; //کلاس لایه Business Logic
namespace CommunityServer.Data
...
کد اضافه کردن پست به وبلاگ :
public override BlogPostResults AddPost(WeblogPost post, User user, out int postID)
{
postID = -1;
// Create Instance of Connection and Command Object
//
using( SqlConnection myConnection = GetSqlConnection() )
{
SqlCommand myCommand = new SqlCommand(databaseOwner + ".cs_weblog_Post_Create", myConnection);
myCommand.CommandType = CommandType.StoredProcedure;
myCommand.Parameters.Add("RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue;
// Add parameters
//
myCommand.Parameters.Add("@SectionID", SqlDbType.Int).Value = post.SectionID;
myCommand.Parameters.Add("@ParentID", SqlDbType.Int).Value = post.ParentID;
myCommand.Parameters.Add("@AllowDuplicatePosts ", SqlDbType.Bit).Value = true;
myCommand.Parameters.Add("@DuplicateIntervalIn Minutes", SqlDbType.Int).Value = 1;
myCommand.Parameters.Add("@Subject", SqlDbType.NVarChar, 256).Value = post.Subject;
myCommand.Parameters.Add("@IsLocked", SqlDbType.Bit).Value = post.IsLocked;
myCommand.Parameters.Add("@IsApproved", SqlDbType.Bit).Value = post.IsApproved;
myCommand.Parameters.Add("@IsTracked", SqlDbType.Bit).Value = post.IsTracked;
myCommand.Parameters.Add("@PostType", SqlDbType.Int).Value = post.PostType;
myCommand.Parameters.Add("@EmoticonID", SqlDbType.Int).Value = post.EmoticonID;
myCommand.Parameters.Add("@UserID", SqlDbType.Int).Value = user.UserID;
myCommand.Parameters.Add("@Body", SqlDbType.NText).Value = post.Body;
myCommand.Parameters.Add("@FormattedBody", SqlDbType.NText).Value = post.FormattedBody;
myCommand.Parameters.Add("@UserHostAddress", SqlDbType.NVarChar, 32).Value = post.UserHostAddress;
myCommand.Parameters.Add("@PostDate",SqlDbType .DateTime,8).Value = post.PostDate;
myCommand.Parameters.Add("@BloggerTime",SqlDbT ype.DateTime,8).Value = post.BloggerTime;
...
همانطور که می بینید WeblogPost وUser از کلاسهای لایه Business Logic هستند