Questions tagged [data-access-layer]

Data access layer is a layer of a computer program which provides simplified access to data stored in persistent storage of some kind, such as an entity-relational database.

A data access layer (DAL) in computer software, is a layer of a computer program which provides simplified access to data stored in persistent storage of some kind, such as an entity-relational database.

For example, the DAL might return a reference to an object (in terms of object-oriented programming) complete with its attributes instead of a row of fields from a database table. This allows the client (or user) modules to be created with a higher level of abstraction. This kind of model could be implemented by creating a class of data access methods that directly reference a corresponding set of database stored procedures. Another implementation could potentially retrieve or write records to or from a file system. The DAL hides this complexity of the underlying data store from the external world.

For example, instead of using commands such as insert, delete, and update to access a specific table in a database, a class and a few stored procedures could be created in the database. The procedures would be called from a method inside the class, which would return an object containing the requested values. Or, the insert, delete and update commands could be executed within simple functions like registeruser or loginuser stored within the data access layer.

Also, business logic methods from an application can be mapped to the Data Access Layer. So, for example, instead of making a query into a database to fetch all users from several tables the application can call a single method from a DAL which abstracts those database calls.

1287 questions
-1
votes
1 answer

C# SQL access using Form, Business Logic and Data access layer

I am presently trying to write a simple application that stores some client data. I understand the separation of the form Layer, Business Logic and Database access logic; however what I can not figure out is when you have accessed the data the best…
FalloutBoy
  • 119
  • 1
  • 6
-1
votes
1 answer

MVC + 3 layer; DAL and viewmodels

I'm altering a normal 1-layer webshop into a 4-layer. The problem is with DAL methods that return viewmodels or take viewmodels as parameter. Below is how I'm thinking but it won't work since DAL can't access viewmodels. MVC: reference BLL and…
joakim0112
  • 33
  • 4
-1
votes
2 answers

repetitive code in BuisnessLogic MVC

I'am working on a MVC solution, my DAL layer I could solve with a Repository classes, everything is working great. But in my BLL layer I have repetitive code: My Crud is the same, my fields and consructor are different. I can also have some extra…
Kris Martele
  • 29
  • 1
  • 7
-1
votes
1 answer

Leaking Quriable objects to upper layers

i have an application that is flexible, that the user can: filter by any field sort by any multiple of fields. and because it will run in ASP.Net Site + some Xamarin C# Apps, i will also have paging in it. For network performance, it will…
-1
votes
1 answer

openbravo callout to use OBDal.getInstance .save Not working

I Have Applied Logic on all the row which i get in the list in eclipse console i got the correct result everything is fine ,but now i just want to set the value again here my code in openbravo callout for (ShipmentType st_op :…
Aziz Shaikh
  • 33
  • 1
  • 6
-1
votes
1 answer

using action handler to Fetch Record from OBProvider.getInstance().get(class)

Want u fetch all record from a table which name is shipment type ShipmentType st = OBProvider.getInstance().get(ShipmentType.class); what should i use to know the lenght of it to run a for loop Example: for(i=0;i<=st.getID.length();i++;) { ToDo…
Aziz Shaikh
  • 33
  • 1
  • 6
-1
votes
1 answer

Entity framework connecting to database with app.config

I'm developing a program using entity framework with WPF and using a SQL credentials on the database. When deploying the program it produces the program.exe.config file which contains the connection string. Any user can open it and see the…
-1
votes
1 answer

AppCode to Web Service C#

I have an appcode with many classes that contain the business logic and Data access layer. I am trying to port over classes to a web service but I have to create an asmx for each class. Are there ways around this ? Please help
Nano_Bott
  • 1
  • 2
-1
votes
1 answer

What are the deciding factors for choosing a ORM

What are the deciding factors for choosing a ORM or going for a custom Data Object Model. When is better to go for a custom Data Access Layer and when is it better to go for an ORM?
Andulos
  • 433
  • 6
  • 20
-1
votes
1 answer

Creating Data Access Layer methods for Domain Models with extra data

I am currently building a blog posting web application using MVC 4 in C# mostly for the purpose of honing my knowledge of application architecture. Currently it is in a tiered structure as: View > View Model > Controller > Data Access Layer > Data…
klex
  • 35
  • 6
-1
votes
1 answer

Types of three-tiers Web Programming (Webforms or MVC)

I already know just a kind of model, you see below Are there different types of web programming layer? The relationships between the layers can be different ? Different than in the image above (Presentation Layer - Business Logic Layer - Data…
Hamed F
  • 800
  • 3
  • 11
  • 23
-1
votes
1 answer

Getting error while tryin to create database from my C# application

"Activation error occured while trying to get instance of type Database, key "DbDalFactory_ISuborderSplitInclusionProvider"?" Already tried adding this key to the config file, also checked oracle.DataAccess versions referred in solution.
kau_m
  • 21
  • 6
-1
votes
1 answer

Using SQL DSN With SubSonic

I want to create a SQL connection using DSN. Then I want to generate the DAL using Subsonic. Please can you give me some pointers on what to do?
Ritesh
  • 1
-1
votes
1 answer

How can I test database interactions in c#

A bit of background: I've been mostly developing in Java and Javascript for the past years and recently i've been moved to a C# project and tasked with implementing a Data Access Layer for this project. As far as i understood it this DAL will call…
DVM
  • 1,229
  • 3
  • 16
  • 22
-1
votes
3 answers

Choosing data access methods in ASP.NET MVC

As I am a beginner to ASP.NET MVC, I would like to know what are the best data access methods for ASP.NET MVC?
ACP
  • 34,682
  • 100
  • 231
  • 371
1 2 3
85
86