Questions tagged [asp.net-mvc-web-api]
The asp.net-mvc-web-api tag has no summary.
90 questions
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
487
views
How often should I request a token when communicating with a third-party API?
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 →...
1
vote
0
answers
475
views
SignalR Handle Multiple Clients in my Scenario
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 ...
4
votes
1
answer
1k
views
How to authorize and store user login from a xamarin frontend to a asp.net core api
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 ...
-3
votes
1
answer
382
views
What is the simplest version of best practice application architecture for a backend in C# and ASP.NET Core WebAPI?
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 ...
1
vote
2
answers
2k
views
Should an ASP.NET Web API application use Entity Framework in the API controllers?
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 ...
0
votes
0
answers
956
views
Separating models in a Backend-For-Frontend (BFF) API
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 ...
0
votes
0
answers
751
views
Running multiple MVC projects: One site
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 ...
-4
votes
1
answer
398
views
When designing a web application with Vue.js and ASP.NET Core, is ASP.NET solely for the API?
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 ...
2
votes
1
answer
3k
views
Calling executables from an ASP.NET WebAPI
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 ...
1
vote
2
answers
1k
views
Putting it all together - DDD, CQRS, Web API
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 ...
-1
votes
2
answers
75
views
What should be the REST API (URL) for a user to be assigned to multiple territories
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/...
0
votes
2
answers
643
views
Wait time created by having separated REST API and web application
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 ...
3
votes
2
answers
9k
views
Web API - strong classes or dynamic?
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 ...
1
vote
1
answer
605
views
Creating JWT token internally
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 ...
2
votes
1
answer
331
views
What features are missing from WCF Rest Implementation
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
...
2
votes
4
answers
7k
views
Web API - How to prevent the POST-ing of entities with custom Id values
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 ...
0
votes
1
answer
530
views
Use of iFrame to avoid IE oddities
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 ...
7
votes
3
answers
38k
views
Is it okay to have multiple get action methods in ASP .Net Web API controller according to RESTful API constraints?
I have the following interface in my business layer
public interface IUserService
{
void CreateUser(User user);
List<User> FindUsersByName(string searchedString);
...
1
vote
1
answer
415
views
Architecture for email service API
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 ...
2
votes
2
answers
957
views
Best technique for pushing many records and files to a system: WEB API or FTP
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 ...
22
votes
2
answers
13k
views
Isn't CQRS overengineering?
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 ...
2
votes
1
answer
6k
views
ASP.NET Web API: enum or strings
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 ...
1
vote
1
answer
177
views
In which order should page- and pageSize-parameters be used?
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 ...
1
vote
1
answer
561
views
Consume ASP.Net REST API service
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 ...