Skip to main content

All Questions

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 ...
kylemart's user avatar
  • 153
1 vote
1 answer
1k views

Dotnet (.NET) core MVC WEB API SPA Project and Solution Structure

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
22 votes
2 answers
12k 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 ...
SiberianGuy's user avatar
  • 4,823
0 votes
1 answer
713 views

What's the most straightforward way to integrate my company's custom authentication with ASP.NET SSO?

My company has a series of WinForms applications that pretty crudely provides authentication by checking usernames and passwords directly against the database (with a little hashing). I have a fair ...
gsj's user avatar
  • 1
0 votes
1 answer
202 views

What's the point/Use of writing out just the method signatures for an API in .Net Web Api

I have been asked to write the signatures for and API end points GET/POST/PUT methods. I'm having a hard time wrapping my head around what the point of this is. My co-worker asked if I could do this ...
Stavros_S's user avatar
  • 103
5 votes
1 answer
8k views

why Web API 2 has RouteConfig.cs file?

I m working on Web API project, and it is using WebApiConfig.cs file to defined routs for Web API. Web API fold RouteConfig.cs file. I have googled and they say RouteConfig.cs is for MVC routing. It ...
user576510's user avatar
5 votes
1 answer
3k views

What is the clean way to pass my LoginContext down through the layers to the data access layer?

I have inherited an API implemented using ASP.NET WebApi 2. The actions on the controllers are all like this: public object Get(long id) { LoginContext loginDetails = GetLoginDetails(); if (...
David Keaveny's user avatar
1 vote
1 answer
2k views

Invoking a web service in a Web API Project…in which layer to invoke?

I am using Microsoft ASP.NET Web API 2 and one of my end points has to internally invoke a legacy non-Microsoft web service (not asmx or svc) . Which layer should I invoke this in? I currently have :...
Sartorial's user avatar
8 votes
1 answer
3k views

Is there an advantage to using WCF or WebAPI for mobile?

I'm looking at doing my first mobile development using Mono Touch and Mono for Android. I'd like them to communicate with an ASP.NET MVC 4 site I'm designing. I've worked with WCF and WebAPI in the ...
allen.mn's user avatar
  • 305
1 vote
1 answer
3k views

project layout using webapi

I have the following project structure I would like to implement. I would like to know if there are any pitfalls to structuring my code this way. It is going to be using Microsoft's WebAPI, an MVC 4 ...
Charles Lambert's user avatar