data-access-layer

How can I duplicate a SPROC-table dependency graph after these SPROCs have been replaced with DALs implemented outside the database?

I need a solution for an enterprise environment with 100s of applications and SQL databases. A current architecture standard requires that all applications implement DALs using SPROCs. One reason for this is that, when performing ongoing migration, obsolescing or modifications to databases, dependency graphs between these SPROCs and data...

Alternatives for NHIbernate?

HI all, What all other libraries or frameworks we can use apart from NHIbernate? Can linq work with entites as the NHIbernate does? Can linq automatically generates entities for us? Does the Data application block come with .NET 3.5 or some separate installation is required? ...

ADO.NET Entity Framework and LINQ to SQL

Hi, Can anyone answer my question? We are deciding upon the implementation of our Data Access layer. Initially we were working with NHibernate but now there is a change, so please answer my question... IS LINQ to SQL a part of the ADO.NET Entity framework or is it a separate library? If I say I am using "LINQ to SQL" for ...

How can my application use both an MS Access database and a SQL Server database at the same time?

What strategies and techniques have you used to produce a data driven application that needs to access multiple diverse data sources? Specifically, Microsoft Access and SQL Server. Ideally, I'd like to make an abstraction layer that hides the physical data source from the application. Something like the ADO.NET Entity Framework would ...

is it ok to do the Data Access Layer using only SqlConnection SqlCommand and SqlDataReader

I know that nowadays there is a lot of ready-to-go stuff that you can use, but if you want full control over db requests/queries, and best performance I think that this is the way to go. Also because ADO.NET does the connection pooling automatically for SqlConnection, how do you think ? ...

Are static methods appropriate for a Linq To SQL DAL?

Hey, I'm using Linq to SQL for my DAL and have heard various things about using static methods in a web application (regarding threading/concurrency issues). At the moment, I created a test DAL, which seems to be functioning fine. However, are there any problems with the way I've created it, since it's static? public static class ...

Dynamic parameters for where clause in a typed dataset possible?

The normal ASP.NET TableAdapters are good for simple where clauses, for example - "where city = @city and state = @state and zip = @zip" But how do I design a DAL that allows me to use any combination of the parameters - "search only by city" or "search by zip and state" or "search by city and state".....or even more complex "search by ...

SQL Server CE 3.5 SP1 Stored Procedures

I have been tasked with taking an existing WinForms application and modifying it to work in an "occasionally-connected" mode. This was to be achieved with SQL Server CE 3.5 on a user's laptop and sync the server and client either via SQL Server Merge Replication or utilizing Microsoft's Sync Framework. Currently, the application connec...

Problem with custom paging in ASP.NET

I'm trying to add custom paging to my site using the ObjectDataSource paging. I believe I've correctly added the stored procedures I need, and brought them up through the DAL and BLL. The problem I have is that when I try to use it on a page, I get an empty datagrid. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="PageTest.asp...

Level of separation of database objects in DAL

Looking for some general advice here. Option 1. Would it be best to have all of the main database objects (say Contact, User, Customer, etc. have their general classes in DAL with nested classes for db objects that depend on the main objects (ContactAddress, UserEmail, etc... these would have multiple values so they are contained in sep...

ConcurrencyFailureException

Hi, How can I cause ConcurrencyFailureException in my Spring DAO when it accesses Mysql(myISAM) And Oracle(10g) ? I want to make a real database exception (not the mock one) from my Java code. Thanks ...

Data Access Layer with Enterprise Library in Mobile Applications

How can I use Enterprise Library to do a Data Access Layer in c# for Sql CE and .NET Compact Framework? I haven't found clear examples. I would like to learn Enterprise Library but any example will be appreciated. ...

Recommendation for creating DAL objects

Hello There, Can you recommend a DAL object creator that is simple yet useful. I want something that creates and updates object the way LINQ does. It should be in c# and much better if it splits object's properties and data access methods in partial classes. We've used CSLA before but I want something more simplier for our next project...

How do I connect my data access methods to my asp.net UI?

Hi there, I am seriously at a loss here. The three things that will not change in this project are the fact that we are using the Entity Framework to do our data access, the fact that we want thorough unit testing and that our UI is asp.net. My question is how the hell do you make this work in Asp.net? E.g. You can use an ObjectDataSou...

Should the DAL be a translation layer between the relational model and the domain model?

Simple question for which I think I have an answer but I am looking for a sounding board. Should the DAL be the one translating whatever comes from the database (be it through straight SQL, stored procedures, ORM, whatever) into Domain Entities as understood by the business layer? On a separate note, should all Domain Entities be defined...

LINQ support in Enterprise Library Data Access Application Block

Is LINQ support available in the Data Access Application Block. ...

Unit testing methods that call methods with dependencies to the data access layer

I work on codebase that doesn't have any unit tests in place and I'm trying to get add some unit testing to it. The code is VB.NET but isn't very object oriented. We're using NUnit for unit testing. A lot of the classes have shared/static methods. I'm trying to unit test a method that calls other methods that use the data access layer. ...

How to use bll, dal and model?

Dear all, In my company I must use a Bll, Dal and model layer for creating applications with a database. I've learned at school that every databasetable should be an object in my model. so I create the whole model of my database. Also I've learned that for every table (or model object) there should be a DAO created into the DAL. So I d...

Switch `ConnectionStrings` between local and remote with Linq to SQL

First, by Remote I mean a central dedicated SQL Server on our Network. By Local I mean a local SQL Express install. My situation is in house only. No cloud services, external sites, etc. My app allows the user to work disconnected but in order to minimize traffic and a few other issues as well I would like to allow them to connect st...

.NET Object persistence options

I have a question that I just don't feel like I've found a satisfactory answer for, either that or I've not been looking in the right place. Our system was originally built using .NET 1.1 (however the projects all now support 3.5) and all entities are persisted to the database using stored procedures and a "SQLHelper" that has the stan...