Skip to main content

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.

data-access-layer
0 votes
0 answers
29 views

C# Winform app - Data Access library method errors on DatabaseProviderFactory().Create("Dataconnectionstring")

I am working with an existing N-Tier designed project, models, business layer, data access and a common library. The solution contains also 2 .NET web applications and I've added a new winform project/...
William's user avatar
  • 21
0 votes
0 answers
51 views

Rust, relation DBs - what's the most efficient way to selectively access data in the database?

I have a Rust application connected to the Postgres database. Let's say I have a users table: CREATE TABLE users ( id SERIAL PRIMARY KEY, email VARCHAR NOT NULL UNIQUE, password_hash ...
Eugen Bondarev's user avatar
0 votes
0 answers
17 views

Error code stating "The ObjectContext might be in an inconsistent state."

I am using Visual Studio VB programming against an SQL database utilizing DataAccessLayer & an EDMX file. .NetFramework 4.0 is a resource being used. It simply deletes records from a table called ...
KiteBoarder's user avatar
0 votes
0 answers
56 views

Hibernate: Transactions, Locks and DAO architecture in concurrent environment

Now I have basic DAO interface for Entity object (contextual data actually doesn't matter): public interface EntityDAO { CompletableFuture<Void> create(Entity entity); CompletableFuture&...
Feniksovich's user avatar
1 vote
0 answers
25 views

How to use auth policies to exclude some properties on a model when rendering JSON?

I've got some kind of calendar feature in my Laravel app. Users can have one or more calendars. The owner of a calendar can share it with another user. If an owner shares a calendar with someone, he ...
user2190492's user avatar
  • 1,174
2 votes
1 answer
149 views

Still using dataset?

I'm a fossil I know. I still use dataset, Datatable, Datarow, Dataview and so on. Having been around since the VB 4 days, I have seen many different data accesses come and go. I consider the dataset ...
Mikael's user avatar
  • 21
1 vote
3 answers
2k views

How can I separate data layer from Next.js API routes?

I am using Next.js with MongoDB, Currently I am using the MongoDB client itself in TypeScript. I was wondering if later on I have to change my database, I need to customize the api/route.ts file. ...
Visrut's user avatar
  • 549
0 votes
1 answer
45 views

React API Internal Endpoint Call is paragraphs long... Better way to do it?

I'm currently working on a React application that's using an internal API endpoint call, which interacts with a DAL layer and writes to a MongoDB hosted online. My issue, I made a less complicated ...
ArchangeLillith's user avatar
0 votes
0 answers
455 views

NestJS - what are the best practices to consider return types of custom queries from the DAL?

I have a project with NestJS where I use the classic controller-service-dal architecture. Until recently, I performed only simple queries from the DAL which returned the models themselves (or entities ...
user2993539's user avatar
1 vote
1 answer
422 views

How to add data of one table to another table using Id and display it using .net api

I have 2 tables in my db. One is country table and other is state table. Country table has Id, name ,states[]. State table has Id, stateName, countryId. I need to fetch a country details based on Id ...
Saran S's user avatar
  • 69
0 votes
0 answers
27 views

what are the consequences if I set the id parameter(in DA layer) to final?

if the id that I get from database won't change during process(which usually don't), why can't I set it final? and by "can't" I mean I didn't see any software that did it before. I searched ...
lWubaLubaDubDubl's user avatar
2 votes
3 answers
1k views

Is the service layer in my .NET Core/Blazor architecture redundant?

I have a data access layer (a C# library), a .NET Core application that I intend to use as a service and several projects that need to talk to this service, including a Blazor WASM project. My DAL has ...
Hannah Hayes's user avatar
0 votes
0 answers
42 views

How to split below action method code into separate DAL & BLL in asp.net mvc?

Do you have any suggestions on how one might one split the "action method" (see code below) into a separate DAL and BLL? public ActionResult GetLogs() { //set up your connection ...
Rajnikant's user avatar
0 votes
1 answer
73 views

DI excpetion for service in api with Data Access Layer

I'm trying to use DI and Access Layer Pattern copying this https://davek.dev/crud-with-mongodb-in-c-and-net-6#heading-service-layer. So my project structure is like this: where DbAccess Has This ...
Dorialean's user avatar
0 votes
0 answers
33 views

Could my C# method that saves an entity into SQL database return Id of the inserted row? [duplicate]

I'm using IDbConnection interface for saving data into my SQL tables, that has a method called Execute, which executes the query and returns the number of rows affected I have the following code: ...
Dake's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
86