Questions tagged [asp.net-mvc]
The ASP.NET MVC Framework is a Microsoft web application framework that implements the model-view-controller (MVC) pattern.
559 questions
0
votes
1
answer
143
views
How to test load balanced ASP Core based website?
I have a simple ASP Core based website that is connected to my local SQL Server Express, some of the third party plugins used, do have reliance on other products i.e. scheduling timers.
I would like ...
3
votes
1
answer
448
views
Gradual upgrade of an inherited .NET Framework project
I'm seeking advice on the best approach to upgrade a legacy .NET Framework project to a newer version. The project currently consists of over 80 projects, and a complete rewrite would be a time-...
-2
votes
2
answers
3k
views
Chose between .net 4.8.1 and .net core 6.0 . is the support life cycle an important factor to consider
I want to start developing a long-life ERP system to a customer. now on paper I would chose to develop it using .NET core 6.0 with SQL Server. But one of the main drawbacks which the customer did not ...
-1
votes
1
answer
2k
views
How are parameters values passed into a MVC controller constructor?
For this MS sample code, I have checked Program.cs, Startup.cs, and other config files, don't see how the two parameters sqlQueryService and sqlCommandService are populated. Appreciate if someone can ...
0
votes
2
answers
794
views
Best practice ASP.NET MVC share code with Web API
I'm trying to develop an ASP.NET MVC-application with an additional Web API.
To reduce code-duplication, I'd like to share as much code as possible, but with the possibility to differentiate between ...
2
votes
1
answer
1k
views
In an MVC Application, What Goes Where?
In an Model-View-Controller (MVC) design pattern, What goes where? What code goes to model and to controller?
I know (do I?) that business logic should be define in a model, but a lot of example I ...
2
votes
1
answer
3k
views
How to unit test public method which internally calls many internal or private methods which are already individually unit tested [duplicate]
In our ASP.NET Core application, we have many APIs which are calling public method from the service class. Service class is implementing an Interface. Each service method (depending upon complexity ...
0
votes
1
answer
185
views
Monolithic view model MVC
Currently working on a legacy app. One section deals with generating "reports", each which share some common subsections, that are based on strongly-typed razor partial views. The largest ...
0
votes
1
answer
2k
views
Right way of folder structure in MVC Project
I'm building a project with C# AspNet.Mvc. I'm using Entity Framework Core. It has Poco which maps in data from DB. On Mvc project itself i've got ViewModels folder where i have models topass between ...
5
votes
1
answer
5k
views
Moving shared CQRS/Mediatr Request Handler logic into services and avoiding code/logic duplicity?
We recently embraced Clean Architecture and CQRS, by way of Mediatr, in several of our new applications. A similar (SPA-based) demo can be seen here. For many of our WebApi-based projects, this worked ...
1
vote
2
answers
10k
views
How to retrieve a device information (e.g. device name) via web page
What we want to do is very simple
We have a check-in kiosk website (C# ASP.NET MVC), and we are trying to set up 30 kiosk stations at each building (each building is about 200 ft away from each other)....
7
votes
3
answers
16k
views
Is unit of work pattern really needed with repository pattern
I am trying to use EF6 with my project. I just watched Repository Pattern with C# and Entity Framework, Done Right | Mosh video. I understand the necessity of Repositories but I still don't understand ...
-1
votes
3
answers
642
views
Using a separate desktop application for handing scheduled tasks in an ASP.NET MVC Application
I have an ASP.NET MVC application and I will need to execute a task every one minute.
The task is:
-> Go to database
-> Check from Table 1 if a record has value = "something"
-&...
-1
votes
1
answer
285
views
How shall I implement a MVC program into presentation, business logic and data access layers?
Here is part of an ASP.NET MVC program, from https://docs.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/controller-methods-views?view=aspnetcore-3.1 :
A model class Movie:
public class ...
1
vote
1
answer
700
views
Does Asp.Net Identity worth the overhead?
I'm creating web applications using Asp.Net Core Identity with N-Tier architecture. Lately I've been discovering many properties of this library that I didn't know before as I need to configure the ...
0
votes
0
answers
411
views
Is it the right pattern for Razor Pages' private methods to return IActionResult to handler?
Is this a good code pattern in ASP.NET Core Razor Pages, for private methods to return IActionResult to the calling handler?
// Public handler
public IActionResult OnGet()
{
var result = ...
-2
votes
1
answer
707
views
MVC Routing (attribute routing) and project structure
how would i organize my project structure, areas or folders to
support logical grouping structure within my project.
www.mysite.com/org/{dynamic}/Importer/{controller}/{action}
Currently i have two ...
1
vote
1
answer
152
views
Best practice for multi-application communication and events?
Essentially, I have a web application and a console application. The web application allows users to configure what will be processed, which is just a big information processor. From the web UI, a ...
6
votes
1
answer
3k
views
DDD with web api, validation in domain or application layer?
I saw a lot of discussion, but I don't know how to do it in a real world.
I understand that validation duplication in the client and server is needed.
But how to elegantly validate in server and ...
1
vote
2
answers
359
views
Downloading and appending data from AWS S3 whilst avoiding clashes
I have to upload a TSV file to an S3 bucket, the content is form submission data. Another service will consume and do things with this data as soon as possible. The service would like one large file ...
0
votes
1
answer
2k
views
Where to store calculated values of an entity
Trying to figure out the best place to store calculated properties related to a base entity class for use through out the application, namely in view models and DTOs.
For example, a base entity class ...
1
vote
1
answer
2k
views
Simple Audit Logging Design
I have a C# MVC application. One of the requirements of the application is to maintain an audit log of everything that happens to a particular 'entity' page. To make the example concrete, lets say ...
1
vote
1
answer
230
views
Should all my asp.net MVC controllers use Web APIs?
The thing that I don't understand is the prioritization between MVC Controllers and Web APIs.
Consider I want to make a website. I can either program to APIs and for the presentational layer, force ...
2
votes
4
answers
8k
views
How do you manage objects that are shared between back-end services and front-end services/apps?
I have multiple REST-ful APIs that I'm using as my "back-end". I also have multiple web apps (.NET MVC). These web apps make calls to the APIs for data. So, an object being returned by an API will be ...
1
vote
2
answers
662
views
Handling Authentication with both Web App and API
Not sure how to handle this. Our current app (.Net MVC) is accessed via companyname.appname.com, authentication is handled via forms (cookie) authentication.
Within the app there is a global search ...