data-access-layer

How do I reference the Sqlite db file in the App_Data folder for my ASP.NET Web Application?

I'm currently storing my sqlite db file in the App_Data folder as per ASP.NET best pattern and practices. Currently I'm using the following in the webconfig: <connectionStrings> <add name="sqlite" connectionString="Data Source=|DataDirectory|MyDB; Version=3;" /> </connectionStrings> and the following in code: ...

Transaction across DAL operations + a web service call + logging

I've already looked here and found some great advice on managing transactions. My problem is that I'm also calling a web service in at least one case, logging to a database table. Here's some psuedo-code that might help make things more clear: customer = batchRefundToProcess.RefundCustomer; //Validate everything ...

Does AutoSproc Scale Well?

We use AutoSproc as our DAL, not my choice, but it was there when I started working at my job. I was wondering if any one had any experience using AutoSproc with large web applications? I'm just curious if it would scale well as our application is growing and we might need to pop it into a web farm at some point. If it doesn't scale wel...

SPROC to update record: how to handle unchanged values

I'm calling a update SPROC from my DAL, passing in all(!) fields of the table as parameters. For the biggest table this is a total of 78. I pass all these parameters, even if maybe just one value changed. This seems rather inefficent to me and I wondered, how to do it better. I could define all parameters as optional, and only pass t...

UI, Business Logic Layer, Data Layer and where to put web services

We are developing a web application. We want to possibly reuse the work we do here for a different application that will use the same database, and use the same business rules for reading and writing to said database. Which design would be more correct Having the UI call web services, which would use business objects containing the b...

Designing DATA Access Layer in ASP.NET 3.5 app

I need to decide about the DATA Access Layer of a medium sized web application to be run on the intranet of a company. I've worked with CodeSmith before and found it useful but it consumes lot of development time if the underlying database schema changes, so would like to do away with it and try my hands with some new DAL which would hel...

Webservice/Entity objects or datareader for my winform app?

Is it best to use a webservice to pull data from a database and load it into my entity object, then send the entity objects to my winform app? Will this make any performance difference over going direct to the database and pulling a datareader back to the winform client, then loading the entities on the client? Some of the users will b...

Inheritance/design issue with domain entities that can be individual or combined

I have completely confused myself trying to design the necessary interfaces and abstracts to accomplish loading of domain entities that can be used by themselves as well as combined into an aggregate. Wow. That was a buzzword mouthful. Essentially, I have two objects that I would like to have base-type "load" functionality, but when t...

Designing the Data Access Layer

Hi, I'm facing a design issue regarding how to design my DAL. As we all know, in its most basic definition, the DAL means the layer that is responsible for communicating with some data repository (of course I'm not talking about the Repository pattern), usually a database. Now this is where the catch is. Some of our business objects wou...

Data Access Layer or having object with CRUD methods?

I used to have a Data Access Layer that take the object by parameter and handle with abstraction the type of persistence required. At my new job, the architect is thinking to implement CRUD operation (load..save..delete..update) into all model object. Those method would have an object by parameter that will handle the saving of the objec...

C++ DAL Design - Include Foreign Key Table as Composite Object

Hi, I recently posted this C++ DAL question about how best to design a 'loadCar' method in a C++ DLL, with the consensus being that 'bool DAL::loadCar(int id, Car&) {}' would be the best signature to use. Now, it so happens that in a lot of our use cases the client code will often want to retrieve the car's manufacturer with the car ob...

N-layered database application without using an ORM, how does the UI specify what it needs of data to display?

I'm looking for pointers and information here, I'll make this CW since I suspect it has no single one correct answer. This is for C#, hence I'll make some references to Linq below. I also apologize for the long post. Let me summarize the question here, and then the full question follows. Summary: In a UI/BLL/DAL/DB 4-layered application...

how can we retrieve data from database in ASP.NET using VB as language?

i need the complete code for retreiving the data from a database.. i m coding in visual web developer and using VB as coding language. I m using SQL SERVER as database handler. ...

Data access patterns in SQLCLR

I'm using SQLCLR in my project and, for the record, I'm very pleased with it. However, I can't find any good sources of information for good data access patterns. Usually I do communication between .net and SQL using stored procedures because I always want an API for my database. However, in this case the .net code is part of the API, s...

Problem Using AutoMapper To Map DAL Properties To BLL Properties

I have a BLL class which contains properties for the fields in a Country table (CountryCode, CountryName, etc). It also has a property ioDAL, which is a reference to a DAL class (created with SubSonic 2.2), which has same named fields. I have a LoadRecord() method which calls the DAL's FetchById() method that populates the DAL properti...

data access approach for using sqlite in C# VS2008 project??

Hi, I've got Sqlite working in a basic sense for my C# project in Visual Studio 2008 via use of the ADO.net Sqlite wrapper from http://sqlite.phxsoftware.com/. Question - For a C# winforms newbie what VS2008 data access layer approach would you recommend I look to use for my winforms app, as I need to write/read data from the sqlite da...

What's the most efficient driver to use with ADODB to access a MySQL5 Database ?

I've been using ADODB for PHP on several projects for quite some time, and I like it for the ease of use and the efficiency. I've never been too curious about the way that lib accesses data because you know...it just worked :) But today I realized I'm still relying on the legacy MySQL4 ADODB drivers. I'm using MySQL 5.x, and it would pr...

Incorporating a Windows Mobile, a Silverlight and a Web project under a common DAL (Ria Services)

I am in the beginning of my thesis, and I have to implement a solution about aggregating reports, obtained by a Windows Mobile application, to a central storage. Then, the available data are going to be presented through an Entity Framework model, using RIA services as a data access layer, for the Silverlight project. Can I utilize the R...

Where "Ado.net entity frame work" files in 3 Layer Architecture ?

If I use ADO.NET Entity Framework in our project and we depend on 3-layer architecture pattern that we have ( presentation layer - business layer - data access layer ) a project for each layer So when I make an entity model file where can I put it in the DAL or BL? If I put it in the DAL and from Presentation layer want to access a do...

Where should I be creating the entity objects?

I have an entity class and an entity DAO class. Should it be the responsibility of the DAO class to create instances of the entity class, or should there be an entity creator/manager class that uses the DAO class only to get the data from the database to create the entity class. Thanks, Chris ...