1,281 questions
0 votes
1 answer
78 views
In three-layer architecture, what do layer dependencies start to look like when OOP objects are involved in the Business layer?
As a coding test I've been tasked with developing a toy three-layer architecture DBMS project, involving OOP principles. The three-layer stuff isn't strictly my background so I've been trying to study ...
0 votes
0 answers
46 views
How to access Data from external module's DAO in some other module's service layer
I have an interface: public interface UserDao extends Dao <UserEntity> {} It has one Implementation UserdaoImpl which looks like: @Component public class UserDaoImpl extends EsBaseDao < ...
0 votes
1 answer
54 views
Where should database calls that return primitive types be located and who should be calling them, Application Services or Domain Services?
As far as I know Repositories should work with Domain/Business Entities. All the operations to save and retrieve data to create entities should go there, and then the Repository is used by the Domain ...
1 vote
0 answers
41 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 ...
2 votes
1 answer
284 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 ...
2 votes
1 answer
3k 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. ...
0 votes
1 answer
88 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 ...
0 votes
0 answers
787 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 ...
1 vote
1 answer
613 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 ...
0 votes
0 answers
31 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 ...
2 votes
3 answers
2k 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 ...
0 votes
0 answers
51 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 ...
0 votes
1 answer
85 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 ...
0 votes
0 answers
38 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: ...
0 votes
0 answers
108 views
How to assign SQL @Action flag in ASP.NET MVC DAL class using single stored procedure?
Here is my SQL query: CREATE PROCEDURE User_CRUD @Action varchar(20), @eno int, @ename varchar(50), @salary money AS IF @Action = 'Insert' BEGIN INSERT INTO employee (...