Architecture :: Should DAL Reference Added In Presentation Layer? How To Access The Instance Of Table In Presenta

Mar 3, 2011

I creating 3 tier arch wpp in VS 2010. I added the BusinessAccessLayer refernce in Presentation Layer. and I created DataAccessLayer[DAL] and ORM [DBModel.DBML]. when i try to create the instance for the Table in presenation layer[default.aspx], The Table name is not shown.After adding the DataAccessLayer refernce in the presentation layer, the table name[MM_User] instance are shown.Is it the right method [Adding the DAL refernce in Presenation Layer]? If not, whats the solution for for accessing the instance of the tables[MM_User].Is it related to the Creating the DataContextWrapper class in DAL?

View 5 Replies

Similar Messages:

Architecture :: How To Pass The Values From Presentation Layer To Business Logic Layer

Oct 26, 2010

I am new to this .NET what is the difference between N-Tier and 3- Tier Architecture. If they are same. How to pass the values from presentation layer to business logic layer.

For Example

I have 10 controls in presentation layer. I passing values to these controls. How the architecture works.

View 3 Replies

Architecture :: Using Data Sources Vs. Using Data Access Layer To Populate Presentation Controls?

Mar 17, 2010

We are using a tierd design with a Data Access Layer and classes for everything we need. This serves as an advantage because we do not have to write querys over and we can separate the Presentation layer from the Data Access Layer and Business Rules.I have always in the past populated GridViews, DataLists, repeaters,etc with SqlDataSources. This is what I have become accustomed to and I feel like it is simple. For querys such as Select * from Members, I feel like using a DataSource is simpler than having to go in the code and calling methods to populate and DataBind these presentation controls.

I am working with a gentleman who has introduced me to the world of Data Access Layers and we are breaking everything down into simeple, but effective queries to populate controls and do what we need to accomplish with this application. He is not very approving of using any type of DataSource. We are disagreeing on the time and place to use these class methods to call the database.So my question is, which is more widely used in the programming world? Do most people use DataSources to populate presentation controls regardless of the Data Access Layer they are working with? Which type of queries are best suited for a DAL - simple, populating queries or complicated joins and upserts?

View 9 Replies

Architecture :: Data Access Layer And Business Logic Layer?

Jun 24, 2010

I am building a web site following the tutorials on I am using dataset as data access lay, and writing classes to access the dataset. But the example is just basic ideas, how do I retrieve individual table column value in the business layer?For example, if I have a table called Product, I only want to find out what is the product name by product id. I did this in my ProductBLL:

public ProductBLL
public int GetProductName(string productId)
ProductDataSet.ProductDataTable prodData = Adapter.GetProductById(productId);

Is there a better way, or am I doing this correctly? Can anybody give me a reference to a more complicated business logic model?

View 16 Replies

MVC :: How To Make Business Layer Seperate From Presentation Layer

Feb 23, 2011

I've even got my JQuery Ajax submission going on now but I've encountered another problem. I *think* it's something to do with the structure I'm using but like I say, I'm fairly newo this.I have my AJAX form submission which builds my "PersonViewModel" (model for the presentation layer) in JSON and sends it to "@Url.Action("RegisterSubmit")" in my Person Controller. Now, I seperate my business layer from my View/presentation layer so in "RegisterSubmit"I'm verifying the model is valid then instantiating a new instance of my business model "Person", adding the values from "PersonViewModel" and then calling my "Save" function.

View 7 Replies

Architecture :: How To Pass The Data Between Data Access Layer And Business Acces Layer

Jun 3, 2010

here i have in 3-tier architecture , how to pass the data between DAL and BAL. i am using grid view to edit the data,when ever i click on the edit button all the corresponding fields should come to textboxes. i tried for delete ,it works fine bt not working to EDIT.

View 7 Replies

Architecture :: Use STATIC Methods In Data Access Layer?

Feb 4, 2011

I am developing a web application, which has Data Access Layer and this layer has only one class, in which all methods are static methods like static Insert, static Update, static Search. It has no properties. I am using these methods in my Bussiness Logic class for my users who are visiting my website.Now my question is : 1. Is it right to use static methods in this scenario ?2. What will happen if 10 users call Insert method at the same time ?

View 3 Replies

Architecture :: Exception Handling Between Data Access Layer And Code Behind?

Jul 20, 2010

If an error happens in the DA_layer, how do I pass it do the code_bedhing to show the user?


View 3 Replies

Architecture :: Impact Of Using Static Methods In Business Access Layer In 3 Tier Applciation?

Aug 25, 2010

is there any impact of using static methods in Business Access layer in 3 tier applciation,

View 4 Replies

Unit Test The Presentation Layer Of A Web Forms Application?

Jan 8, 2011

What is the best way to unit test the presentation layer of a web forms application? I have been told that there are frameworks available like Watin. Are there better tools around?

View 1 Replies

Designing System With Presentation Layer And Web Service Based API

Oct 19, 2010

We are designing a system that has functionality that is essentially the same at the presentation layer and the exposed API layer. My question is what technique / strategy to use so we can get the most reuse out of our code with performance in mind? Here's a simplified example: A user can add a Customer via a web form. This will fire the Customer.Create() method. An API consumer / user can add a Customer via a SOAP / HTTP-POST to a web service which will call the Customer.Create() method.

Imagine these layers:
WEB SERVICE API (Customer.Create() is available here
FACADE Business Object Interface - Customer.Create() signature is here
BUSINESS Business object - Customer.Create method() is fleshed out here
DATA ACCESS - Writes data

The presentation layer SOAP calls the Create() web method, which calls the facade's Create() method which calls the business object's Create() method which wires via the data access layer.


Is there a concern about performance in using the API's web services in our presentation layer, or are there alternatives to connect the presentation layer directly to the facade? If so, what technology to use (WCF, Remoting, Web Services, etc)?

View 2 Replies

Architecture :: How The Data Pass From One Layer To Another Layer In Mvc Design Pattern

Apr 1, 2010

how the data pass from one layer to another layer in mvc design pattern...

View 2 Replies

Web Forms :: Retrieve Rows From Store Procedure In BAL And Iterate In Presentation Layer?

Feb 23, 2010

Actually what i am doing in my Data Access Layer dragging store procedure to TestDbml to display records and creating data context instance in BAL to retrieve records and my method in BAL is like this

public IEnumerable display()
using (TestDataContext db = new TestDataContext())
var display = obj.USP_Actor_View_Speciality(p_UserName, 1);
return display as IEnumerable;

Now the problem is that how can i iterate or fetch over the records and display accordingly in my Presentation Layer so that i could return all the field parameteres Like ield1=val.field1,field2=val.field2.

View 3 Replies

Data Access Layer - DAL DatasSet And Table Adapter Not In Namespace - Northwind Tutorial?

Mar 31, 2010

I've been attempting to walk through the "Creating a Data Access Layer" tutorial found [URL]I create the DB connection, create the typed dataset and table adapter, specify the sql, etc.When I add the code to the presentation layer (in this case a page called AllProducts.aspx) I am unable to find the NorthwindTableAdapters.ProductsTableAdapter class. I tried to import the NorthwindTableAdapters namespace, but it is not showing up. Looking in the solution explorer Class View confirms that there is a Northwind class, but not the namespace I'm looking for.

I've tried several online tutorials that all have essentially the same steps, and I'm getting the same results.Can anyone give me a push in the right direction?I'm getting error: Namespace or type specified in the Imports 'NorthwindTableAdapters' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member.I think I might need to add a reference OR they may be creating a separate class and importing it into their main project. If that's the case, the tutorials do not mention this.

Imports NorthwindTableAdapters
Partial Class SuppliersTest2
Inherits System.Web.UI.Page


View 7 Replies

Architecture :: Exception Layer In N-tier Architecture?

May 13, 2010

I'm developing a n-tier architecture... I'm confused with handling exception in the layers... Is it a good practise to add a Exception Layer to the architecture.

View 3 Replies

Forms Data Controls :: Cannot Access Header Row Error / Object Reference Not Set To An Instance Of An Object

Jul 2, 2010

I tried to get the heade row text with the following code, but it failed.


Error returned was "Object reference not set to an instance of an object." on this line:


View 3 Replies

Forms Data Controls :: How To Access A LinkButton Inside A Repeater/Object Reference Not Set To An Instance Of An Object

Jan 16, 2010

why I get this error:

Object reference not set to an instance of an object.

when I try to access a LinkButton inside a Repeater as follows:



View 4 Replies

State Management :: Error Like: Object Reference Not Set To An Instance Of Reference?

Aug 25, 2010

I have a url like this: In this page, when I click on a link it takes me to a page So in the cental.aspx.cs page I did the following in the page load:

if(request.querystring["comp"].tostring() != null)
//do some thing [code].....

So I got an error like: object reference not set to an instance of reference.My problem is, I am using the same page. So when I go from some page, I will have "comp". but other times not. So when there is no "comp", how do I handle it in request.querystring?

View 3 Replies

C# - Manage Back End Data Layer Class Instance Throughout Site?

Jan 21, 2011

I'm new to web dev. and I'm using to build a website. I currently have a class called DataLayer that I'm using to perform all of my database functions, and also store some queried information. I initially had this class as static, because that's how I wanted it to behave, but then realized that will be all kinds of bad for multiple users.

I have to make an instance out of this class in order to use it, but I need to maintain the same instance throughout several webpages for that user. Any thoughts or ideas on how to go about this approach? How to pass this object from page to page? Store in session variable, as a global object somehow?

View 2 Replies

Architecture :: Differences Between MVC And 3-Layer?

May 11, 2010

In my opinion, these architectures have some differences, such as:

1. 3-layer is a linear architecture, but MVC is a triangle architecture.

2. Presentation Layer of 3-layer includes View and Controller of MVC? And Model of MVC includes Business Layer and Data Access Layer of 3-layer

I think 2 differences above are not obvious or are incorrect!

View 3 Replies

Web Forms :: "object Reference Not Set To An Instance Of An Object" Error When Access The Dynamic Control

Nov 25, 2010

I got this error "object reference not set to an instance of an object" when i want to display the values of dynamic generated drop down lists by pressing a button to show the values in Listitem.

i have master page in which i use :



3) treeview menu

Server side Code is:


View 3 Replies

C# - Access The Login Control Error "Object Reference Not Set To An Instance Of An Object"

Mar 24, 2011

I'm working on ASP.NET app and in the master page C# code I want to access the login control, so I have the following code:

Login login = new Login();
login = this.Master.FindControl("login") as Login;

But, I get exception "Object reference not set to an instance of an object" when this line

login = this.Master.FindControl("login") as Login;

is executed. I can't see what can be wrong...

View 3 Replies

C# - Proper Implementation Of N-layer Architecture?

Feb 28, 2011

I have been learning C# for the last year or so and trying to incorporate best practices along the way. Between StackOverflow and other web resources, I thought I was on the right track to properly separating my concerns, but now I am having some doubts and want to make sure I am going down the right path before I convert my entire website over to this new architecture.

The current website is old ASP VBscript and has a existing database that is pretty ugly (no foreign keys and such) so at least for the first version in .NET I do not want to use and have to learn any ORM tools at this time.

I have the following items that are in separate namespaces and setup so that the UI layer can only see the DTOs and Business layers, and the Data layer can only be seen from the Business layer. Here is a simple example:


Am I completely off base? Should I also have the same properties in my BLL and not pass back DTOs to my UI? what is wrong and what is right. Keep in mind I am not a expert yet.

I would like to implement interfaces to my architecture, but I am still learning how to do that.

View 4 Replies

How To Use Of Business Layer In 3-tier Architecture

Jan 27, 2011

I am implementing 3-tier architecture. I just wanted to know the role of business layer in 3-tier architecture.

I am developing application in using entity framework. So I have entity object which is accessiable in PL,BL & DL. My question is whether input assignment to entity object should be in PL OR BL.(Consider there is save method)

View 2 Replies

Architecture :: Performance Between 3 Or 2 Layer With Linq

Mar 13, 2011

i build online course selection for a university now i want to make it layering and i dont know to make it 2 layer or 3 layer i mean mix business layer and database layer because i use linq so it is not require to check request data that in sql from client in business layer because linq check it autimatically to preent injection and it right?can i put my class and DB class in same place or layer?if i make it 2 layer the performance becom better?

View 5 Replies

Copyrights 2005-15, All rights reserved