.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

examples of recomended linq to sql n-tier application

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :.NET Framework
Hi Are there any best practise examples of a c# n-tier solution. Perhaps showing the dal, business layers caching etc, with example files, projects and code? I've read lots of theory, but I'd like to actually see an example of something. Thanks Stu

View Complete Post

More Related Resource Links

How to create 3 tier application using LINQ

As you know that in 3 tier architecture there are three layers

User interface layer. (Is our Form in Windows application and .aspx page in Web application)
Data Access layer. (Which provides interface between Business logic layer and Database)
Business Logic layer.(Which stores your application logic)

Logic behind N -Tier Application Development

In the arena of application development, developers all over the world use various programming languages, technical processes, and technical tools. While using number of technical & non technical elements the processes or methods become complex, for simplification of the application development process, developers use various techniques such as dividing the application architecture into layers or parts. In the professional & technical language this separation or division process is called N-Tier Application Development process, where "N" stands for number and "tire" stands for layers or parts.

Application Architecture: An N-Tier Approach - Part 1


Free Trial: SQL Backup Pro
Sponsored by Red Gate
Exceptional DBAs make the most of their office hours. That's why they love Red Gate SQL Backup Pro. Its faster, smaller, secure SQL Server backups mean more time spare to accomplish more tasks and professional training. Make time to be an Exceptional DBA. Download it now! »

Free Trial: SQL Toolbelt
Sponsored by Red Gate
The SQL Toolbelt is a set of twelve powerful and intuitive tools that will help you burn through SQL Server chores with astonishing speed and accuracy. Download it now! »

Download: SQL Backup Evaluation Center
Sponsored by Red Gate
Download the T-SQL scripts in the SQL Backup Evaluation Center to compare Red Gate SQL Backup Pro's compressed backups with the size of backups created using native SQL Server. Download it now! »

Autodesk Inventor®
Go Beyond 3D To Digital Prototyping With Autodesk Inventor. Learn How.
Virtualization Solutions
Optimize, Simplify, & Save Today. Learn About Microsoft Solutions.
Microsoft SQL Server® 2008 - Free Trial
Download the Free 180-day Trial of SQL Server® 2008 Enterprise Edition!
Hot Careers in Internet Marketing
Get prepared for your new career with online degrees from Full Sail University!
Microsoft Te

Which tier do Linq queries belong?


Started in middle of a new project.  Our design architecture uses an n-tier (not MVC - no controllers) structure with Presentation, Data, Business and Service tiers.  However the lead analyst has the majoriety of code all in the Business tier claiming it all contains Business logic.  Our data tier is nothing more than a single .dbml model of the primary database to support all of the Linq queries in the Business tier.  To my mind Linq queries and classes they use are data access and belong in the data tier  but our lead analyst says they contain business logic therefore have to be in business layer.  

Entity Framework: N-Tier Application Patterns


This article examines n-tier patterns for success and some of the key APIs and issues specific to the Entity Framework. It also provides a sneak peak at features coming in the Microsoft .NET Framework 4 that should make n-tier development significantly easier.

Daniel Simmons

MSDN Magazine August 2009

Data Validation in a 3 tier application

Say you have a form  designed in  Silverlight(Front end)-Asp.NEt(business layer)-SQl(bakcend)Should data validation occur on all 3 layers or just the presentation layer or  a combination of the front end with the other 2  e.g. validating an email address? I'm trying to undestand as to why if data has been validated on the presentation  why further data validation would be necessary  especially if there would be large amounts of data being validated and this could potentially slow down database transactions? 

Using Linq to Objects within an ASP.Net application

I am thinking to continue the LINQ series of posts but I want to give a clear example on Linq to Objects . In all my classes people seem to have the following answer to this question, " What kind of data can we query with LINQ? " Most people say " Well, we can query an SQL server database " . I am not very pleased when people forget the other flavors. LINQ to Objects allow us to write "queries" over collections of objects.This is the first and most basic flavor of LINQ. LINQ to Objects enables you...(read more)

Which of the two design patterns should be used in a 3-tier Asp.Net application?


I'm trying to decide which of the two factory patterns I should use in my Asp.Net applications:

1 : All DAL providers derive from same abstract base class DepartmentsProvider, which defines public interface of the class ( all the necessary CRUD methods for which derived classes  (providers ) provide a concrete implementation ).  BLL layer instantiates correct provider by calling DepartmentsProvider.Instance:


    public abstract class DepartmentsProvider
       static private DepartmentsProvider _instance = null;
       /// <summary>
       /// Returns an instance of the provider type specified in the config file
       /// </summary>
       static public DepartmentsProvider Instance
               if (_instance == null)
                   _instance = (DepartmentsProvider)Activator.CreateInstance(
               return _instance;

       public abstract List<Department> GetDepartments ();
       /// Concrete provider
       public class SqlDepartmentsProvider : DepartmentsProvider
           public override List<Department> GetDepartments()
               using (SqlConnection cn = new

Application Server on Three tier Farm


I have this configuration:
MOSS1 & MOSS2 - Web Server & Query Server
MOSS3 & MOSS4 - Craw Servers - Central Administration on MOSS3

My question is...Is safe to stop Sharepoint Foundation Web Aplication Service in MOSS3 & MOSS4?


Using LINQ in 3-Tier Architecture



In ASP.NET 2.0, I found Scott Mitchell's series on the 3-Tier Architecture supremely helpful for organizing reasonably complex web applications: http://www.asp.net/learn/data-access/tutorial-01-cs.aspx

I'm wondering how to incorporate ASP.NET 3.5 technology (namely, LINQ), into this same presentation / business logic / data access model for application development.

For developers that wanted to forgo sprocs altogether, would the:

  1. O/R Mapper be used to create the data access layer?
  2. Class files for LINQ to create the business logic layer (though this really seems like data access)?

Thanks for any insights!


NullReferenceException was unhandled by usercode in mvc application using linq to sql


Hi friends

I am getting an exception like"NullReferenceException was unhandled by usercode-Object reference not set to an instance of an object." in (IEnumerable)Viewdata.Model.

 <% foreach (EmployeeMaster m in (IEnumerable)ViewData.Model)
               { %>

I am getting exception in the below code (view page)

<% foreach (EmployeeMaster m in (IEnumerable)ViewData.Model)

      { %>

Kindly help me in this issue...

how to connect different server in 3 - tier Application


I want to develop a three tier architecture app.I have no idea when we
place our BLL and DLL code in different server how to connecct this
BLL and DLL code to our Website(UI).

Thanks in advance.

Updating Data-Tier Application project after schema change has been made in SSMS

I have successfully created a Data-Tier Application project within visual studio. How do I update these scripts to reflect the changes made by a DBA in SSMS?  Also, on another project we use Entity Framework which drops and recreates the database from within the application. I would also like to import these changes into the Data-Tier Application project.
I can figure out how to import the database into the project the very first time. But after a change has been made using another tool, how do I synchronize the project in visual studio?
When I create a schema comparison that points from database -> project, it correctly analyzes the schema changes. Am I missing how to update the project with these changes?
Thanks, I really would like a solution to this so I can use Data-Tier Applications instead of a third party tool.

Playing with Linq grouping: GroupByMany?

One of its features is grouping. Many people understand grouping like it is defined in Sql. Linq is implementing grouping quite the same way. Let's discover this syntax and how to make consecutive groups easier.

LINQ : Implementing IN and NOT IN

I got tried of typing

var result = from s in source
where items.Contains(s)
select s;and so I implemented the IN and NOT IN methods as extension methods:

101 LINQ Samples Tutorials

101 LINQ Example with sample code snippets....This sample prints each element of an input integer array whose value is less than 5. The sample uses a query expression to create a new sequence of integers and then iterates over each element in the sequence, printing its value

Microsoft's Collaborative Application Markup Language (CAML) Loop

discovered an interesting error recently while working with Microsoft's Collaborative Application Markup Language (CAML) that, surprisingly, had received no ink. Partly what surprises me about this is that the error may require you to rewrite large sections of your code if you haven't previously considered this SharePoint limitation. I'll start with some context, but first of all the error is:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend