Data Access Layer With Enterprise Library?

Jun 14, 2010

I've VS2008 and enterprise library 4.1 installed .I want to display few records in the categories table of my NorthWind in my presentation layer through data access layer with enterprise library. I've added references of the following dlls in my data access layer project( which is of type class library)

Microsoft.Practices.EnterpriseLibrary.Common

Microsoft.Practices.EnterpriseLibrary.Data
Microsoft.Practices.ObjectBuilder2

how to access data from the database using datareader , entity beans and rendering data on to presentation layer.

View 2 Replies


Similar Messages:

Use Enterprise Library For Another Website On Same System To Build Data Access Layer

Feb 22, 2011

In my system, the data access layer of one of the website is build using the enterprise library. Now I am developing another [different] website. How can I use the enterprise library to create the data access layer? I am very beginner to Enterprise Library? How can I configure it for my website? Should I have to include the DLL? How it will take the connection string from the Web.Config file?

View 1 Replies

Architecture :: Data Access Layer And Business Logic Layer?

Jun 24, 2010

I am building a web site following the tutorials on asp.net. 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);
[code]...

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

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

Enterprise Library 4 Dataconfiguration Tag

Jan 25, 2011

I am using Enterprise library for my data access. when I am running the application, at the CreateDatabase() statement I am getting this exception:

Microsoft.Practices.ObjectBuilder2.BuildFailedException was unhandled by user code Message="The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Data.Database, null]) failed: The value can not be null or an empty string. (Strategy type Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy,index 2)" Source="Microsoft.Practices.ObjectBuilder2"

Now, I googled a bit and I found that I have to place

<dataConfiguration defaultDatabase="LocalSqlServer"/>

but I don't know where. Is it the right solution? Also, at the time of installing enterprise library I didn't see any connection string statement? So, I wonder how it will take the connection string from web.config file. In the connection string section of my web.config file I have:

<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=MSTR;Initial Catalog=USERDb;Integrated Security=true;" providerName="System.Data.SqlClient"/>

View 1 Replies

Enterprise Library With Linq To Sql?

Aug 5, 2010

I wanted to get any feedback (put out a feeler) for how the enterprise library plays with linq-to-sql generated classes. I was considering using the validation handler to provide validation logic/display to the UI level. I am considering the caching handler, validation, and authorization handlers primarily.

View 1 Replies

MVC :: Validation From The Enterprise Library?

Sep 13, 2010

I have a question about validation. Basically how the MVC framework is setup it can use DataAnnotations. It calls TryValidate in a controller which does some other black magic, and poof, you have a ModelState with validation results. Now to extend this validation you can create a validator and then provide custom validation on both server and client side. Here is the problem... what if you dont want to hard code all of the validation in the classes? I would like to use what Microsoft has already provided in the Enterprise Library [URL]for validation. I will be using both DataAnnotations and configured rule sets. Of course I could just put the code in each action, but that is so 1999. As I see it the MVC framework falls short by not allowing us to use the config for such things. Why is the validation so specific for MVC? Why could it now have used the Enterprise Validation? I wrote my own abstract controller and put in Enterprise Library validation and it worked GREAT!!! So why am I here? Well, surly there must be a better way... do I really have to write my own controller abstract class to change the validation?

So if you think you know how to solve this problem, you must provide a solution that does this:

Uses DataAnnotations AND Configuration RulesCan validate the SAME in a console application (could really be any non-web app) and MVCI do see that MVC 3 adds a little more support for validation which was really needed. It supports IValidatableObject, which allows you to validate the whole Model... its nice, but now we have 3 ways to do that same thing... granted the former 2 (DataAnnotation on the class, and a Validator for the DataAnnotation) could not pass the error to the correct place in the view. Now if we could just support all of this validation in a place what any type of application could use it. In my use case I will run validation on the MVC app, perhaps some other apps, and on an ESB.

View 2 Replies

C# - How To Learn Enterprise Library 4.0

Mar 20, 2010

I'm trying to learn the Enterprise Library. I found this useful code sample to get data from a SQL database. But I tried to send data via a parameter. I'm also using the UPDATE, DELETE, and SAVE methods. Can you give me a similar sample? I'm using Enterprise Library 4.0.

[code]....

View 4 Replies

Architecture :: How To Use Enterprise Library /EF4

Sep 4, 2010

Recently i have joined a new project that is to be build from scratch.(goal of the project is to reach the users across boundaries : windows, web & mobile)

I follow architecture having following layers:1.Presentation Layer 2. Logic Layer(BLL) 3. Business Objects 4. Data Access Layer.

But this time i wanted to use new technologies Microsoft have introduced like Entity Framework 4.0 , WCF services.

So i have thought of creating the layers like

1.Presentation 2. BLL 3.Services 4.Business Objects 5.DAL

but i am in confusing state how to use Entity Framework. in the above layered diagram.If there any flaws in the above layered diagram do guide me.I have heard of Microsoft Enterprise Library(MEL) 5.0. What exactly it is?

Will i get benefited with MEL 5.0.

View 3 Replies

Sample MS Application For Enterprise Library?

Mar 18, 2010

Does MS have a sample enterprise application that demonstrates the use of different Enterprise library blocks (Logging, Dataaccess, Exception, Validation etc)? I am looking for something that uses best practices in using and integrating all these blocks in a single application.

View 3 Replies

Populate Dropdown Using Enterprise Library 5.0

Jan 18, 2011

Is there a simple code to populate a dropdown box using Enterprise Library 5.0 DAAB? I've tried this, but it is not working:

cmbOffice.DataSource = _db.ExecuteDataSet(
CommandType.Text,
"select office_id, office_name from office").Tables[0];
cmbOffice.DataBind();

View 2 Replies

Microsoft Enterprise Library Opinions

Mar 9, 2011

Has any one used Microsoft's Enterprise Library, if so what parts of it did you use? I am using building a website (I guess the client app type is not important, it can be a Windows app as well) with all the architectural layer, and I am specifically interested in the exception handling, logging and caching blocks for now. Any one used these, what were the good and bads of your experience with, any alternatives that you rather decided to use? Performance is a thing that I am also interested in. I am looking for a decent exception handling framework which is how I came across the exception handling block. Anything other out there? Is it a wise idea to use the data access block with an MVC application seeing that everybody is the repository pattern with an ORM framework? I am still researching frameworks, so I would like to hear as many opinions.

View 1 Replies

.net - CacheCallHandler Enterprise Library Contrib?

Aug 5, 2010

The CachingCallHandler included in Enterprise Library 4.1 was removed for Enterprise Library 5.0+. The documentation refers to using the Enterprise Contrib Library to get this functionality, if needed.My questions:Where is this functionality in the Enterprise Contrib Library?Does this work with Enterprise Library 5.0?This is the only functionality I have a definite need for from Enterprise Library but may want to use the validation, as well. I don't see any reason to start with 4.1 when newer versions already exist. But, I'm slightly confused about where to find this functionality.Of note, I don't see this method listed on their page.. still searchingI think this is the namespace, and I don't see the file in the latest download.

Microsoft.Practices.EnterpriseLibrary.PolicyInjection.CallHandlers

View 1 Replies

Enterprise Library: Missing References Folder?

Nov 1, 2010

I just downloaded entLib 4.1. Part of the download process included a DOS bat file that ran for a while. Being completely new to the Enterprist Library I have no idea how to use the Enterprise Library. Online support mentions something about accessing the blocks through the References folder in the Solution Explorer - but I don't have one in my solution explorer. How do I get the References folder to appear so that I can start figuring out how to use the application blocks?

View 7 Replies

Is There Any Simple DAL Generator For SQL Server - MS Enterprise Library - VB.NET Or C#

Feb 9, 2010

Is there any simple DAL Generator for SQL Server/ MS Enterprise Library/VB.NET or C#?

View 7 Replies

Direct SQL Execution To Get Count Using Enterprise Library

Mar 16, 2011

I am new to asp.net development and using enterprise library in my application in the following way.

Database db = DatabaseFactory.CreateDatabase();
DbCommand cmd = db.GetStoredProcCommand("sp_MakePayment");
db.AddInParameter(cmd, "@BillGenID", System.Data.DbType.Int32);
db.SetParameterValue(cmd, "@BillGenID", billgenID);
db.AddInParameter(cmd, "@PayDate", System.Data.DbType.String, 50);
db.SetParameterValue(cmd, "@PayDate", mypaydate.Text);
db.AddInParameter(cmd, "@TransNo", System.Data.DbType.String, 50);
db.SetParameterValue(cmd, "@TransNo", transno.Text);
db.AddInParameter(cmd, "@AmtToPay", System.Data.DbType.Double);
db.SetParameterValue(cmd, "@AmtToPay", Convert.ToDouble(paidamount.Text));
////Execute Stored Procedure
int i = 0;
i = db.ExecuteNonQuery(cmd);

Now I am in a situation where i need to run this inlnie query using the same method to get the count of records and read in a variable. for example following query to find existing bill.

string bill_id = "1234";
string dofpayment = "11/03/2011";
mysql = "Select count(*) from payments where bill_id = " + bill_id + " and payment_date = " + dofpayment ;

Now how to incorporate the above lines using the enterprise library block.

View 2 Replies

C# - Multiple Configuration Sources For Enterprise Library 4.1?

Jun 1, 2010

We use the caching and logging application blocks from entlib 4.1. We want to keep the configuration of those two in seperate files. How can we achieve this?It looks like entlib is always using the selected Source as it configuration.I tried the following:

[code...]

But this doesn't work because the application blocks always use the selected Source attribute value.

View 1 Replies

Configuration :: Enterprise Library - Tracing To Logsource General Failed

Apr 19, 2010

I have a web service that I developed on my local machine using the Enterprise Library for database access and exception logging. This all works fine on my machine but not on my server. I get the following error and i do not know why. Tracing to LogSource 'General' failed. Processing for other sources will continue. See summary information below for more information. Should this problem persist, stop the service and check the configuration file(s) for possible error(s) in the configuration of the categories and sinks. I do not see any errors in the configuration. I can get it to log to a flat file but not to the event log or an email it is to send. This is on a Windows Server 2008. Is there any special permissions I need to set? I hope this is the correct place to post a message such as this, if not let me know where to post it to.

View 2 Replies

Enterprise Library Caching - Remove Objects From Outside Process (console App)

Aug 13, 2010

We are thinking about using the enterprise library caching framework in our asp.net 3.5 application to store small datatables of our most hit products. Is there a way to write an outside process, like a console application, to remove these datatables, if needed? For example, a client can come in and update the data for a product, which will make the datatable stored in cache out of date. When this happens, I would like an outside application go into the cache and remove or even update the cache with the new data.

View 1 Replies

Enterprise Library 3.1 Logging Formatter Template - Include URL Request

Feb 9, 2011

We have a custom web app built using Ektron v8.0 which uses EL 3.1 and the format template in the logging config is configured as such:

<add
name="Text Formatter"
type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging"
template="Timestamp: {timestamp}
Message: {message}
Category: {category}
Priority: {priority}
EventId: {eventid}
Severity: {severity}
Title:{title}
Extended Properties: {dictionary({key} - {value}
)}"
/>

Is there a template item for Request URL? Without the request url with querystring parameters, it's difficult to debug errors.

View 1 Replies

Databases :: Connection Pooling With Microsoft Enterprise Library In Mysql

Jun 9, 2010

I am using microsoft enterprise libarary to connect to mysql using mysql .net connector (latest version 6.2.3)

But i am facing a problem of too many connections and connection pool reached maximum limit issue.

As connection is disposed by enterprise library iteself so i dont close the connection anywhere.

So after two or three hours i found i have 100 mysql connections in sleep mode which are doing nothing and are not being reused from the code .

So i want to ask is there any issue with my code or is there any issue with mysql connector

View 1 Replies

Enterprise Library 5 - Configure FileConfigurationSource Relative To Web Application Folder?

Jun 30, 2010

I have my validation configuration stored in validation.config in my Business Object project. The config file is set to copy if newer

The business object project is referenced by my web project, therefore, the validation.config copies to the bin folder of my web application.

In my web.config I have the validation configuration redirected:

[code]...

View 1 Replies

Configuration :: Enterprise Library 5.0 - Exception Management - Session Time Out?

Jan 2, 2011

I am using Enterprise Library 5.0 - for exception handling. I am logging the exceptions in trace log file.When I publish the webapplication and deploy from my development machine IIS it works fine. When I deploy the same build on Windows Server 2003 R2 Service pack 2 it causes logout.Earlier I was using website for same application (We coverted website to webapplication due to some reasons) and I faced same problem while placing code on server. But when I published and kept the (published) precompiled code on server, logout problem resolved. But now with webapplication after publishing the problem exists.

While debuging I found that during exception logging due to session time out it is logging out. But why session time out on server when same thing work better on developement system IIS. Please suggest if I have to do any setting on server or any other solution.

View 2 Replies

SQL Server :: Enterprise Library 4.0 Error: Input String Was Not In A Correct Format.

Oct 17, 2010

I am trying to insert candidates information into SQL Server database. I have written the corresponding stored procedure like below in SQL server:[Code]....

C# code to access the stored procedure is like below using Enterprice library Application blocks.[Code]....


I am getting the following error:Input string was not in a correct format

View 2 Replies

DataSource Controls :: Is It Mandatory To Close Database Connection In Enterprise Library 4.1

Mar 23, 2010

Is it mandatory to close database connection in enterprise library 4.1?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved