Questions tagged [n-tier-architecture]
N-Tier architecture refers to the architecture of an application that has at least 3 "logical" layers or parts that are separate. Each layer interacts with only the layer directly below, and has specific function that it is responsible for.
979
questions
0
votes
1
answer
59
views
Is there a naming convention for custom repository response objects?
Probably some of you already met this problem. Sometimes you may want to execute a LINQ query which is returning custom data. That data is being encapsulated into a transfer object, but I'm a little ...
0
votes
1
answer
28
views
SaveChanges problem in N-Tier Architecture
Normally, with MVC I use db.savechanges() method after I do some processes. But check the below code when I use N-Tier Architecture in everyloop its gonna insert in this way but I dont want it. I ...
1
vote
2
answers
115
views
N-Tier Dependencies between Project in NET Core
I am very new to ASP.NET Core.
If I create 4 projects like this:
MyApplication
|-- MyApplication.DataAccess
|-- MyApplication.Provider
|-- MyApplication.Service
|-- MyApplication.ViewModel
DataAccess ...
0
votes
0
answers
109
views
Transform MVC to layered Architecture in Spring Boot
I have a classic Spring Boot app, you can see the structure:
I am trying to modify it to have at the end a Layered Architecture.
The problem is that to isolate the layers we must to use APIs between ...
0
votes
0
answers
111
views
How to join two table with repository and service pattern
Greatings,
My project designed base on N-Tier Architecture. There are Core, Repository and Service layers.I have to many tables to join each other.And I would like to use Linq to support multiple sql ...
0
votes
0
answers
160
views
Confusion about n-Tier architecture, which layer we should use for what?
We 2 devs trying to understand the n-Tier Architecture by trying to convert our one layered ASP.NET MVC Project.
Our main concerns are where do we write some stuff that we don't agree each other. One ...
0
votes
1
answer
273
views
Which layer should read from the application configuration in an N-Tier application?
While working on several projects based on an N-Tier architecture I often noticed that I am not quite sure where to actually read from the configuration.
For example, let's say I have a project with ...
2
votes
1
answer
126
views
Entityframework identity register from api with custom identityUser
I need to create an ApplicationUser (a derived class from IdentityUser) with my Asp.Net API, I need to create it in the same database that my Asp.net MVC uses. My request works since it gives me 200 ...
0
votes
1
answer
937
views
Does we need keep Business Logic Layer when we use CQRS + MediatR in net core?
I use n-tier architecture in my net core applications and I want to apply cqrs + mediator patterns. But I have a question that our handlers should call business (service) layer or repository (data ...
0
votes
0
answers
29
views
Is there some way I can encapsulate the error messages from the business logic tier to the presentation tier?
Anything else helps me limit the throw exception in asp net core!
0
votes
0
answers
139
views
Adding cache layer to N-tier application instead of calling database multiple times in ASP.NET Core 5
In an n-tier application, in the business layer, I need to read database entities multiple times for validation purposes, so I decide to add caching layer to reduce the round trips to the database to ...
0
votes
1
answer
67
views
What layer has responsibility of filtering deactivated(mark as deleted) aggregate?
I read [this][1] (dont-delete-just-dont) article, and then I have agreed not to delete aggregate.
My question is that if I'm not using CQRS, what layer has the responsibility of filtering deactivated(...
0
votes
1
answer
168
views
Interaction within Business Logic Layer in 3-layered Architecture? [closed]
We follow 3-tier architecture, where we have presentation layer, business logic layer (Managers) and Data Access Layer.
There are few processes that involves multiple entities which are controlled by ...
0
votes
2
answers
96
views
How to divide the dependencies binding to a DI container between tiers and layers? [closed]
I'm developing a microservice application divided into 4 layers (API, Application, Domain and Infrastructure).
The composition root of my application is an assembly in the API layer. From what I ...
0
votes
1
answer
153
views
I want to use Automapper in Business Layer of my ASP.NET MVC application
I've created an ASP.NET MVC application with 3 layers (WebUi layer, Business Layer, Data Layer). I already have Automapper in the WebUi layer and it's working, I can map the model in WebUi to Dto in ...
0
votes
1
answer
407
views
Axios not calling localhost API
I have a 3 tier application. React as the frontend, flask as the backend, and MySQL as the database. I completed the application and works well locally. I then pushed this code into the AWS Instance ...
0
votes
0
answers
22
views
Return List(T) from Library in c# [duplicate]
i'm new with c# and i have to import List(T) from my library to main and i get this error...
Error : System.NullReferenceException: 'Object reference not set to an instance of an object.'
MAIN CODE
...
0
votes
2
answers
212
views
c# import List(T) from Library to main
im having problems with importing a List(T) method that add all the data to a List.
I need to call it in main and full my list with the data, but always get error like this...
Error CS0029 Cannot ...
0
votes
1
answer
41
views
I am getting an error while producing objects
I'm developing a project with N-tier architecture. I got errors while generating a new object in the main function.I can not give the features of car1. The entire text is underlined in red and I get ...
4
votes
1
answer
4k
views
'IConfigurationSection' does not contain a definition for 'Get' and no accessible extension
I created the JwtHelper class. I have been using it for a long time. However, when I updated the packages, I got an error in the following line;
The complete error message is as follows;
Severity ...
0
votes
1
answer
496
views
How can i pass model to view in asp.net core 5.0 mvc
Im trying to pass that data to my view. I allready look around what can i do or which way i can use or something but im still getting null exception error when i call that ViewBag.passData.
Here its ...
2
votes
1
answer
271
views
Multitier architecture and Identity. Why to use UserManager and RoleManager?
Microsoft Identity introduces UserManager<T> and RoleManager<T> classes to interact with AspNetUsers, AspNetRoles and the other database tables. But why we should use them? Maybe it is a ...
0
votes
1
answer
78
views
Pass variables from Presentation Layer to Logic Layer
I am stuck when I try to make the Logic Layer update the Presentation Layer since I have initialized GUI variables in the Presentation Layer. Still, after that, I couldn't find a way to reach those ...
2
votes
1
answer
2k
views
Configure logging in the business layer of a N-layer application
Recently I started working on a project which basically has the following structure:
As you can see, now we only support logging on the presentation layer where we have try/catch blocks expecting to ...
1
vote
0
answers
38
views
Why I couldn't call Model inside my Controller
I have one problem and I have no idea what to do. I am try couple of method but nothing works for me. I have model Patient
using System;
using System.Collections.Generic;
using System.ComponentModel....
1
vote
2
answers
420
views
Can't Give Dto Reference to Service Interface
I want to use Dtos to transfer data to service.I tried putting it in the business layer, but there is a problem.
My architecture similarly looks like this:
Core Layer (Dependencies:-)
-Entity Models
-...
0
votes
0
answers
79
views
Data validation in n-tier application, does one require to apply validations on each tier
I have the application compliance check requirement mentioned below regarding the service tier applications (WCF services + Web API based).
Req:
"Each element and attribute value communicated in ...
1
vote
1
answer
351
views
How will i resolve Dependency of interfaces which is on 3rd or 4rth layer
I am creating an architecture in Dotnet Core 3.1.
I have created Layers
API
-> Controller
-> Service Interface. (This will be used by Controller Layer)
-> Service Implementation
-> Data ...
0
votes
0
answers
194
views
Exception Handling in N-Tier application
I am writing a N-Tier application using ASP.Net Core.
In my service layer in logic tier I have an API which update the user's password. Here is the code from the service layer.
public IActionResult ...
0
votes
1
answer
186
views
When editing a item in my CRUD screen, my Id sets automatically to 0
I am working on the CRUD functions in my ASP.NET Core application. I have this problem where when I try to edit a character (character is Karakter in Dutch) the ID of the character that I provide is ...
0
votes
0
answers
29
views
C#, N-Tier, MVC | Error: 'Object reference not set to an instance of an object.' [duplicate]
So I am working on an MVC n-tier layer application in C# and I am getting a NullReferenceExeption.
What the program should do in short:
The user can type a character kind like for example Defensive, ...
0
votes
1
answer
266
views
C# | How to pass a parameter from View to DAL (via layers)
I am working on a project where I need to give the user the option to type their most wanted kind of character (that can be defensive, offensive, recon, support).
That string that they have typed in a ...
6
votes
2
answers
3k
views
In onion, hexagonal, or clean architecture, can a domain model contain different properties than the domain model in the database?
I am asking you who know well and have experience in building a software using any layered architecture (onion, hexagonal, clean, etc.). Whenever I google about the software architecture, people have ...
0
votes
1
answer
90
views
Displaying Database Data in a Datagrid using WPF and WCF in an N-Tier Application
Having completed the following tutorial: https://learn.microsoft.com/en-us/visualstudio/data-tools/walkthrough-creating-an-n-tier-data-application?view=vs-2019
I'm trying to make the same tutorial ...
1
vote
1
answer
839
views
Where to map DTOs to Entites for Create/Add method in repository
I have a Web Api Application where I have EF DB first entities and DTO classes.
So this is my generic repository interface -
public interface IRepository<TEntity> where TEntity:class
{
...
0
votes
1
answer
384
views
Is there a way in C# to restrict call to indirect referenced library/DLL? [duplicate]
I have a project which is designed in 3-tier architecture. To keep it simple, I will simplify my case in traditionally 3-tiers, Presentation -> Business Logic -> DAL.
I have these 3 tiers in 3 ...
1
vote
1
answer
146
views
cannot make changes in context persist
I am working on a simple 3-tier MVC app, and cannot make context changes persist. Here is my code:
Controller:
[HttpPost]
public IActionResult Register(UserDto user)
{
...
1
vote
0
answers
172
views
Decide enum storage which is uploaded to the server and shared by a Client app and an API
Technology stack: One REST API developed in .Net Core 3.1. Two client apps one in Android and other in iOS
Scenario: Store enum value in the database such that when the data is uploaded to the API it ...
0
votes
2
answers
88
views
VS2017, C# nTier with WCF/EF, cannot instantiate returned obj with IList of rows from EF6 Entify
I'm building an VS C# 5-Tier solution with UI, Service, Logic, Business-Data and Data-Layers projects. I'm using WCF and EF6, with EF6 loaded into the UI, the Service and the Data layers. I'm using ...
-1
votes
2
answers
185
views
3 Layers architecture in vending machine, while keeping OCP
I'm working on a vending machine project, and i tried to split it into UI and BL layers, But
I'm getting into problem. For example I have this function for paying in coins, which derives from an ...
-1
votes
1
answer
59
views
In what order should I develop my N-Tier applicaition?
The problem, a team of developers getting an assignment to create big project from scratch, after considering pros and cons of some architectures, they decided to go for N-Tier architecture.
For an ...
0
votes
0
answers
64
views
How to configure/create a Load Balancer that handles users that need to be on the same server
I have node.js an application running on several instances under a load balancer.
Each instance is homogeneous (same code running on different servers). Users can be placed on different servers by ...
0
votes
0
answers
953
views
Asp.Net Core Mvc using identity With N-Tier Architecture
I just built a web application with n-tier architecture and i want to use Identity for (Login in and register) user.
My blank solution contains :
UI (Presentation Layer)
DAL (Data Access Layer)
BL (...
2
votes
1
answer
991
views
Sharing Data Access Layer DLLs among multiple Projects
We have multiple projects which share same database.We have created DLLs for this data access layer.Now the problem is, in order to share it as DLLs we have kept 3 class libraries(3 layers of database ...
0
votes
1
answer
201
views
Multiple simultaneous connections DotNetCore
I want to use TransactionScope for my business services in my dotnet core project.
I use both of MysqlConnection and SqlConnection.
My purpose is adding some data my own database and do couple of ...
2
votes
1
answer
549
views
Avoid cyclic dependency in n-layer architecture in .NET Core
I have created such n-layer architecture in .net core (console app):
Company.App
-> reference to Company.Services
-> reference to Company.Infrastructure
Company.Services
-> ...
0
votes
2
answers
525
views
Remove coupling between Data Access layer and UI layer
I want to design a n-tier architecture for a Windows application. I want to remove coupling between UI layer and data access layer. In the other words, I want the UI layer to depend to the business ...
0
votes
1
answer
245
views
Can I use viewmodels in my MVC(.net core 3.0) project in my ApplicationLogic project (net standard 2.1)
I have an MVC app where all my view models are in. I added a Business Logic layer project, which is a class library project net standard 2.1, where all my interfaces and services are. I am trying to ...
0
votes
0
answers
134
views
Setting up Web.MVC & Host sites on different servers
I'm new to ABP Core framework. I'm working with the sample project available at https://aspnetboilerplate.com/Pages/Documents/Zero/Startup-Template-Core
I have deployed host API in separate server. ...
0
votes
1
answer
50
views
c# n-tier solution web service client to service layer strange behaviour
I am creating my first n-tier solution in c#.
I've created my tiers, including a service tier just for practicing (it's not neccessary)
I am using Visual Studio 2017 and for back end db I use SQL ...