Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [asp.net-mvc]

The ASP.NET MVC Framework is a Microsoft web application framework that implements the model-view-controller (MVC) pattern.

3 votes
1 answer
246 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-...
Asdrubal Hernandez's user avatar
0 votes
2 answers
909 views

Mediator Pattern in c# - using a mediator to trigger policies

I'm wondering how i can implement what Im calling "business policies" in my code? For discussion purposes, let's say I have two separate contexts - synchronizeUsers and Licensing. The ...
dot's user avatar
  • 571
-2 votes
2 answers
2k 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 ...
microsoftdeveloperdesigner's user avatar
1 vote
0 answers
96 views

ASP.NET MVC use ViewModels with Services

I'm trying to make a simple Blog-application, but I'm a bit stuck on the architecture of the application. I'd like to create a details-page with the content of the blog-post and a form for adding ...
Sam's user avatar
  • 65
-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 ...
Jeb50's user avatar
  • 101
1 vote
1 answer
2k views

Mapping between Entity and ViewModel

I'm trying to make an application in ASP.NET MVC. I'm using AutoMapper for the conversion between entities and ViewModels. In most cases, this works fine, but when I need to add some additional data (...
Sam's user avatar
  • 65
0 votes
2 answers
619 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 ...
Sam's user avatar
  • 65
6 votes
2 answers
1k views

Best way to refactor service with too many dependencies

We are creating the backend for a web app using a sort of layered architecture. The service layer is supposed to handle the business logic and passing data to the repositories. This service layer is ...
zamsler's user avatar
  • 69
2 votes
1 answer
799 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 ...
careLess's user avatar
-1 votes
1 answer
78 views

Looking for way to store, get, partially update few relatively small JSON documents which has different unique types

I have an app with many individualistic features which behavior is controlled by settings. Let's say these are a few utility services with the following settings that are historically stored in ...
valterriann's user avatar
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 ...
WAQ's user avatar
  • 123
4 votes
2 answers
2k views

Why do backend web frameworks use "MVC" when they have no persistent UI to update?

Model View Controller (MVC) is focussed on UI based applications. In MVC the model notifies the UI (view) when its values change and the view then decides what and if to update. I can understand this ...
Eoin's user avatar
  • 319
0 votes
1 answer
167 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 ...
Lovethenakedgun's user avatar
1 vote
3 answers
410 views

Is creating an entity in a database considered to be business logic?

According to my (perhaps incorrect) understanding business logic includes saving/updating entities in the database, as well as connecting with any 3rd party API's or using services and should ...
Yos's user avatar
  • 157
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 ...
Mattew's user avatar
  • 9

15 30 50 per page
1
2 3 4 5
38