Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Questions tagged [asp.net-mvc-web-api]

Filter by
Sorted by
Tagged with
0 votes
2 answers
794 views

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
0 votes
1 answer
133 views

We have a .Net WebApi 2 we've been working on for quite some time. As we refactor code, we started thinking of what might be a better practice: a) "to get an app by userid", or b) "to ...
RoLYroLLs's user avatar
  • 119
-2 votes
1 answer
487 views

I have an ASP.net web API. I would like to call another API that has an authentication token inside my API. The code flow is as follows: My API is called → Get authentication token from 3rd party API →...
raysefo's user avatar
-1 votes
1 answer
1k views

I have a web api with controller methods that use rest http(post/get calls). Clients consume this API with normal httpclient calls and I pass an http response back. My use case is I have a legacy ...
Terrance Jackson's user avatar
1 vote
0 answers
475 views

I currently have multiple clients who need to be informed when a customer creates a new order. Each customer is registered to an individual client and customers create orders on my website (each order ...
pinman's user avatar
  • 11
1 vote
4 answers
3k views

So this is an example endpoint to fetch one user by its username [HttpGet("{username}")] public async Task<ActionResult<object>> GetUser([FromRoute] string username) { // ... ...
Question3r's user avatar
4 votes
1 answer
1k views

So I suppose this question isn't as much as a 'How to' but a 'which way' kind of question. So I have a .net core api backend that makes calls to a dB I also have a xamarin forms project that ...
dros's user avatar
  • 167
8 votes
2 answers
2k views

I am traditionally a desktop app developer, but circumstance has thrust me into the role of doing web client and corresponding REST api logic for a project I am involved in. Unfortunately, I'm a one-...
Geo...'s user avatar
  • 181
-3 votes
1 answer
382 views

I know that in some contexts, best practice would be DDD, CQRS and EventSourcing, but in my case this would be too complicated of two reasons: My team is beginners, and we want them to be productive ...
Terje Kolderup's user avatar
-3 votes
1 answer
194 views

I know that a RESTful would have unified API and it treats everything as a resource (a noun, example a book, a product,...) and it can be applied with CRUD operations using HTTP Verbs (GET, PUT, POST, ...
Ashokan Sivapragasam's user avatar
1 vote
2 answers
2k views

Im a bit confused about what is best practice when working with Entity Framework and ASP.NET Web API. I am working on a project that contains a iOS/Android app and an API the app will use to ...
Martin C's user avatar
0 votes
2 answers
1k views

I somehow get the point of REST API, like for example you want to get the list of customers to the database server, you have to request a GET method and the server will throw a response with a ...
Maxim Cruz's user avatar
0 votes
0 answers
956 views

At the moment I have a frontend client calling several backend REST APIs. For example a call may be to get information about a certain vehicle. Then the client will call REST API A to get some ...
Force444's user avatar
  • 643
0 votes
0 answers
154 views

I have an ASP.NET Core 2.2 MVC site, that uses Facebook as an identity provider. Users can click the login button, they are redirected to Facebook to enter their credentials, and are then redirected ...
L-Four's user avatar
  • 333
0 votes
0 answers
751 views

I am developing a "platform", I have an MVC site that will hold all the main data, as well as our generic API, uses Microsoft authentication to create an account, then our employee MVC will add the ...
NateThompson114's user avatar
0 votes
1 answer
300 views

I have this web API project which handle all database access via entity framework. I have another web client reside in DMZ to call those APIs (via ajax or c#) in the web API project. When I make API ...
Pop's user avatar
  • 219
-4 votes
1 answer
398 views

When creating a web application from scratch with ASP.NET MVC Core (using Visual Studio 2017) and using Vue.js, is the MVC Core part of the application solely for the API? What other function would ...
johnny's user avatar
  • 3,679
12 votes
2 answers
19k views

I know that integration tests test parts of project that interaction with each other somehow. And I need to test this interaction. And there is the question: 1)Should these tests use real database ...
NoImagination's user avatar
2 votes
1 answer
3k views

I have an Angular application with a table, and I'm considering having the console application take the name of C# programs that the user can run. I was thinking of passing the name or code of the ...
rds80's user avatar
  • 131
2 votes
1 answer
1k views

I am learning ASP.NET MVC & Web API and trying to implement Onion Architecture with Repository Pattern for one of my Test projects as part of my learning. I have developed single MVC Projects ...
RollsReus's user avatar
1 vote
2 answers
1k views

I need some expert guidance. I'm trying to learn the concepts as well as implement them, and it's possible I might be over-engineering some. But that's OK, because I am wanting to learn and gain ...
user1560457's user avatar
3 votes
2 answers
4k views

I have recently started on a project involving a REST API. The API requires authentication with requirements for administrators to be able to view logged in users and to be able to revoke specific ...
AnotherGuy's user avatar
-1 votes
2 answers
75 views

In our application we have a user who can be assigned multiple territories. What is the best way to expose the REST API? Should it be as : [POST] www.xyz.com/Territory/User OR [POST] www.xyz.com/...
Rahul Jain's user avatar
2 votes
2 answers
4k views

We have a single solution Visual Studio web application with multiple projects. One of the projects (Services project) has APIs for our App clients (Android/iOS). There's separate project for MVC ...
maverick's user avatar
  • 341
0 votes
2 answers
643 views

I created a new Asp.Net MVC web project. I took the decision to create two different apps, the first one would be a web REST API that would provide all data for the second one, which would essentially ...
Nicolas Boisvert's user avatar
0 votes
1 answer
1k views

We have a REST web service written in C# in ASP.NET MVC/WebAPI. When the underlying data store fails, this can lead to our service being completely unavailable, instantly. There is currently no ...
Luke's user avatar
  • 109
3 votes
2 answers
9k views

My web api method should return some structured data about my profile. To do it I created the following POCO classes: public class ProfileInfo { public string FirstName { get; set; } public ...
user285336's user avatar
0 votes
2 answers
2k views

In a multi-tenant deployment of Web application, How can the Asp.Net Core Web API services be designed to work with different authorization services? The Web applications use OAuth and JWT Bearer ...
KDR's user avatar
  • 153
1 vote
1 answer
605 views

I need to implement JWT tokens in my ASP.NET Core API app to handle authorization. My question is, what is the risk of generating my own JWT token within my API app as opposed to having it handled ...
Sam's user avatar
  • 423
1 vote
2 answers
1k views

I am developing a SAAS application where : A single web application is hosted in IIS which will serve to multiple companies and each company will have its own database. The web application and ...
Rahul Jain's user avatar
2 votes
1 answer
331 views

In this question about using WCF and/or WebAPI, there is this quote: I was asking myself the same question until I found this WCF and ASP.NET Web API comparison page on MSDN (with my own emphasis ...
WernerCD's user avatar
  • 812
-1 votes
1 answer
821 views

I have the following situation: ASP.NET Core WebAPI solution which uses Swagger Automatically generated client for WebAPI using Autorest, extended with custom authorization. This client also will be ...
Ihor Korotenko's user avatar
2 votes
4 answers
7k views

Let's say I have the following model: public class Product { public string Id { get; set; } public string Name { get; set; } public string Category { get; set; } public ...
kylemart's user avatar
  • 153
2 votes
2 answers
5k views

I have an annoying code smell in my asp.net core api that I am passing around, and I can't come up with a way to fix. In an MVC controller action, usually there is a very straight forward logic, at ...
gilmishal's user avatar
  • 271
0 votes
1 answer
530 views

I'm working with a team on an ASP.NET MVC C# EF application that needs extensive Help materials. The Help materials will be stored on a helpdesk site (FreshDesk) so they can be accessed as a ...
wayfarer's user avatar
  • 195
0 votes
2 answers
1k views

Let's say I have IRepository interface implemented by Repository class(uses database context to implement IRepository methods). And IUnitOfWork interface implemented by UnitOfWork class using ...
David Maisuradze's user avatar
7 votes
3 answers
38k views

I have the following interface in my business layer public interface IUserService { void CreateUser(User user); List<User> FindUsersByName(string searchedString); ...
Mykhailo Seniutovych's user avatar
1 vote
1 answer
1k views

I am building a new simple web application using dotnet core (.NET Core) and Angular SPA. Does it make sense to split API and Web App into different projects? This would complicate things (...
agfc's user avatar
  • 121
1 vote
1 answer
415 views

I would like to build an application for sending emails. So I chose ASP.NET Core (API) which will be deployed by Docker. The application will get some request and "do some things" and then sends ...
mskuratowski's user avatar
0 votes
2 answers
4k views

There is an enterprise project, which all the business implemented in databases and in the stored procedures, and web API is just like a light wrapper which get the request and deliver it to proper ...
reza damavand's user avatar
2 votes
2 answers
957 views

I have a website where users can upload manuals (PDF documents) for their products. Basically, they first add the product to the system and then add 1 or more manuals to that product. A manual can ...
Zeep's user avatar
  • 33
4 votes
2 answers
2k views

Is it good design to have a controller for each object of your API? I know this is a short question, but it's really a fundamental question that I do not know. Say I have a school or a CRM. That is ...
johnny's user avatar
  • 3,679
22 votes
2 answers
13k views

I still remember good old days of repositories. But repositories used to grow ugly with time. Then CQRS got mainstream. They were nice, they were a breath of fresh air. But recently I've been asking ...
SiberianGuy's user avatar
  • 4,823
2 votes
1 answer
3k views

I'm in the process of developing an ASP.NET Core WebAPI that uses EntityFramework to access the datastore. One of the things we need to support is sorting and filtering. I'm assuming that the HTTP ...
Jake Shakesworth's user avatar
2 votes
1 answer
6k views

I have an ASP.NET Web API application. It uses enums for some fixed sets of states or types. Now I need to extend enum to support more values. But it will break backwards compatibility so I need to ...
Maxim Tkachenko's user avatar
4 votes
1 answer
430 views

For a prototype project I've created an Angular 2 application with simple CRUD functionality using Auth0 to handle authentication with a back-end containing a Web API (core), Service and Repository ...
Sam's user avatar
  • 171
1 vote
1 answer
177 views

I'm building an api and a bit into the development I realized that I constantly change the order of the page and pageSize parameters. Currently I use C# and javascript, so the method declaration ...
smoksnes's user avatar
  • 483
3 votes
1 answer
806 views

I am 1 of 3 developers. The other 2 use Web API and angular to build web apps. I prefer ASP MVC with a repository and EF. The stated argument is that a service is more secure when accessing the ...
BattlFrog's user avatar
  • 183
1 vote
1 answer
561 views

I am creating ASP.Net REST API application and stuck on the part where I should consume the REST service. I am not sure how to find the way let me accomplish the following: 1. I don't want it to be ...
Iglesk's user avatar
  • 113
0 votes
1 answer
262 views

The scenario is to have a Mobile App and Web App too. So currently I can think of two scenarios Which one do you guys think is better? PS : If needed I can also implement DAL Layer in both the cases ...
Krishnandu Sarkar's user avatar