A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [asp.net-core]

A free, open source and cross platform web development framework for building .NET web applications.

Filter by
Sorted by
Tagged with
1
vote
2answers
65 views

Custom services container for ASP .NET core business layer

My model classes (business layer/library of ASP .NET core solution) uses a number of services (IOrmService, IEmailService, IFileService, IHtmlToPdfConverter etc.). Different models requires different ...
0
votes
0answers
39 views

Which authentication should be used for external users (not registered with the system)

I'm working with a project that uses ASP.NET Core 2.2. The main solution contains different projects, including APIs for a mobile application, APIs to integrate the system with third parties, a web ...
-3
votes
1answer
48 views

How to store a limited set of custom properties without using an EAV Schema

I'm designing a solution in .Net which will be hosted on Azure. I have a system which will allow users to specify custom characteristics for their objects which they will track over time. I am certain ...
0
votes
0answers
27 views

RabbitMQ consumer for multiple services

I want to create single consumer application for multiple queues. I want to store queue names in config file, and stop listening to queues/exchanges that were removed from it(and start listening to ...
0
votes
0answers
38 views

c# Asp Net Core Identity divide the frontend from the backend

I have a question about the architecture of my IdendityProvider for User authentication. For security, I would divide my frontend exposed on the internet from backed that is internal to my network ...
0
votes
1answer
218 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
2answers
95 views

Is there still a place for non-async methods in Data Repository?

If we start a .NET Core 3.0 project today, which will use database connection (for example ASP.NET Core Web API), is there still a place for non-async operations while talking to the database? Or in ...
0
votes
1answer
78 views

Using WebAPI as infrastructure layer in ASP.NET MVC

I'm starting a new asp.net mvc core project and for my infrastructure layer I'd like to use WebAPI as this layer should be usable in other solutions besides this one. I'm not really experienced with ...
1
vote
2answers
74 views

Looking for clarification on pub/sub systems and how an API gateway comes into play

I'm new to micro service architecture and I'm looking to understand how services should/can interact with each other. The acceptance for my current story requires me to: Email a document Backup the ...
0
votes
0answers
32 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 = ...
0
votes
0answers
99 views

Is ASP.NET Core Identity a leaky abstraction?

As far as I know, the DBContext or underlying persistance technology should be only contained inside the Data layer. Also, it feels very wrong to me to have identity package inside the user ...
0
votes
0answers
36 views

Registering dependency implemented in separate assembly with shared interfaces

Situation: I have a project with a Business Layer (WizBang.BL) that contains nearly all of my application logic. It communicates with a Data Layer (WizBang.Data) that contains by entity classes and ...
-3
votes
2answers
518 views

What is Difference between DTO and Response Object?

What is the difference between a Response Object and DTO in software architecture? Say I want to get a list of Products in a catalog. If ProductDTO is this, how is a Product Response class different? ...
4
votes
2answers
173 views

Multiple Applications, how to bring them together?

I have 7 different .NET Core applications (solutions). All supporting a different workflow such as customer request, request for change and much more. However, they do share a similar goal (that is to ...
3
votes
0answers
254 views

Onion Architecture: Should Service Layer contain DB Context?

In Onion Architecture, we have repository layer which conducts Crud Operations (simple insert, delete, update). (Applying Entity Framework with database) Onion Architecture Additionally , we have ...
0
votes
1answer
106 views

Call library functions with varying number of inputs while keeping API simple

For a ASP.NET Core application, I'm using a library which performs calculations using objects that have a similar interface but their constructors use different inputs. The inputs are market prices ...
0
votes
0answers
39 views

DDD with web api, how to correctly display error messages that caused by domain to the client?

I asked a question about duplicate validation in domain or application layer. Now, I decided to put all the business rules in the domain layer. I have a value object like this, it has a method for ...
0
votes
0answers
131 views

API Class Input and Paging Specification Pattern in Net Core

I was reading following website, and created a PageModel and Specification pattern. Question is should I merge these two for good practice or keep separate? The PageModel will accept following ...
0
votes
1answer
71 views

Image upload workflow azure

I'm working on a new project. It is a smartphone application made with react-native. In the app, you can create "cards" which are having a title, a description and a photo, taken by the user's phone. ...
2
votes
1answer
244 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 ...
0
votes
1answer
190 views

Which Software Layer should hold Pagination Information?

Which layer should hold pagination information? (Page Size, Page Number), Eg say 100 products, 5 product per 20 pages. User can type in API url layer. api/Product?Page=1&Limit=2&ColumnSort=...
0
votes
1answer
287 views

Domain Driven Design: Should Specification Pattern exist in Repository or Application level for Paging?

In Domain Driven Design, should the specification pattern for paging/pagination exist on the Repository level or Application level, or another layer? Trying to see what Eric Evans author of DDD stated....
0
votes
1answer
145 views

Domain Driven Design: Is OrderLine Detail a Nested Class of Order Header?

I had asked a question here, and someone had recommended that OrderLine be a Nested class within Order Header. Is that a standard practice in Domain Driven Design, or more one of many debated methods ...
0
votes
2answers
146 views

Hosting a standalone .Net Core Web Application

We've created a .Net Core Web Application and are deploying it as a stand-alone exe. The main reason for deploying it stand-alone was to not be dependant upon the version of .Net Core installed on the ...
0
votes
1answer
129 views

Checking tenant information in microservices

I am currently trying my hand at a microservices architecture for the first time, and I am looking to put together a multi-tenant application built on a this architecture. Tenants are created with ...
0
votes
1answer
139 views

Are resource files (.resx) secure?

I have a resource file called AppSecrets.resx, and the bit of code below to check the login credentials of the "super duper admin user". This admin user is distinct from normal admin users, as it is ...
0
votes
0answers
85 views

How can I economically scale to 100+ instances of my .Net Core app without using 1 container per instance?

Currently I have a .NET core application, which fires up a new thread to hold each customer account. Each thread instance: Is long running for many months or more Holds open SignalR Websockets and ...
2
votes
2answers
590 views

C# extension methods design patterns and usage guidelines?

C# extension methods have seen a rise in usage over recent years. The offical microsoft guidelines on usage state: "In general, we recommend that you implement extension methods sparingly and only ...
0
votes
0answers
16 views

how to work with variable data structures and templates

I need users to be able to create an organization which will have some preset fields such as Name, Address, and Type. But depending on the type, the organization can have type-specific fields such as ...
3
votes
2answers
176 views

How should domain services be referenced?

I'm working on a test project, with the intention of using DDD. So far I have this basic project structure: My question is: How should the Core.Domain.Services be referenced? do I create an ...
0
votes
0answers
23 views

Difficulty understanding the purpose of ViewComponents in MVC

I've thrown some of these into my new MVC project for pages where I need 'widgets' on the screen that are on multiple pages. But I'm thinking of scrapping them and using RenderAction instead. All my ...
2
votes
0answers
70 views

Extending IdentityUser with nullable foreign key to another IdentityUser

I'm working on a framework which builds on .net core Identity. Let's say I wanted to extend the IdentityUser<TKey> class with a ParentUserId property while the developer should still be able to ...
0
votes
0answers
151 views

Tradeoffs between Testability and Performance when filtering using SQL vs LINQ

My team has recently decided to adopt the CQRS pattern similar to the one used in the famous Microsoft EShopsOnContainers repository. In this solution, the queries are made in Query classes using ...
0
votes
2answers
114 views

Should I put the messages for business logic validations in API?

I have a REST API written using ASP.NET Core Web API. There are a few business logic based messages I want to send to the clients from the API. I am in a dilemma on which of the following ways I can ...
0
votes
0answers
27 views

Authentication, bussiness logic and several entities in asp.net core

I'm working on an asp.net core application, using Identity as authentication/authorization management. Depending on the role the user can do "some thing", this is the normal way of authorization. But ...
1
vote
1answer
165 views

If we are allowing anonymous users to register inside our web site, how we can prevent hackers from occupying others' email address

I am planning to start a new asp.net core MVC web application. One of the features we are having is that anonymous users can register inside our web application by entering their email addresses. then ...
3
votes
0answers
166 views

Clean Architecture - What is the difference between Use Cases and Core Services?

I'm trying to apply Clean Architecture to a simple ASP.NET MVC Core app by following Microsoft's ASP.NET architecture guidelines and their eShopOnWeb sample project. In the standard Clean ...
3
votes
1answer
191 views

Internationalization in .net core

I am currently in the process of developing an ASP.NET Core application which requires internationalization to Russian. I have been reading over the documentation that Microsoft provide for .NET Core ...
0
votes
0answers
456 views

EventSourcing / CQRS Implementation with ASP.NET Core WebApi and Azure Cosmos DB

I was looking for an easy implementation of the Event Sourcing and CQRS Pattern in ASP.NET Core using Azure Cosmos DB as Event Store. As I couldn't find anything appropriate I decided to write a ...
0
votes
1answer
185 views

Is ASP.NET-Core Hosted-Services supposed to replace Windows Service?

Some time ago when there were no ASP.NET-Core hosted-services the choice for a service-type application was pretty clear, it was a Windows Service. However, recently I've noticed that at least some ...
1
vote
1answer
177 views

Why do some eShopOnContainers Service API Unit Tests not reference API classes only WebMVC? [closed]

I have been trying to learn more about MicroServices architecture and I am using Microsoft's eShopOnContainers as a reference because I am familiar with .NET. I am getting into the part about testing, ...
0
votes
0answers
36 views

Asp.Net Core: creating files in background

I have a web app with SPA client. When user requests a report, that request should create an excel or pdf file in background and notify user via SignalR. I guess I need to save that file somewhere ...
1
vote
1answer
469 views

Pros and Cons of using ASPNET.Core In-Memory Caching instead of Redis? [closed]

I know redis is a very robust caching solution and scales great, but when it comes to simpler non-enterprise websites I feel as if it's a bit too expensive (Azure Standard/C1: $100/m). I'm ...
0
votes
1answer
175 views

Circuit Breaker + Retry - Repository or Application Layer

I currently have a Web App using ASP.NET Core 2.2, Domain Driven Design, Clean Architecture, and CQRS. I'm using MongoDB as persistence. I have developed a Repository pattern to abstract the MongoDB ...
3
votes
2answers
193 views

Queueing async code to execute later

I have a website with basic crud operations that involve data and photos. I also need to extract the metadata for the photos that are being uploaded. My original implementation did not have var puts =...
-2
votes
1answer
431 views

How to implement HTTP PUT correctly

I'm really looking for one good example how to PUT operations should be implemented correctly. What I understood until now: The operation must be idempotent When the resource doesn't exists it will ...
92
votes
15answers
17k views

Should we design our code from the beginning to enable unit testing?

There's a debate going on in our team at the moment as to whether modifying code design to allow unit testing is a code smell, or to what extent it can be done without being a code smell. This has ...
0
votes
0answers
118 views

Authenticated ASP.NET Core MVC site consuming web API

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 ...
1
vote
3answers
626 views

Domain Events, CQRS, and dependency resolution in handlers

Currently: ASP.NET Core 2.2. I've been doing quite an extensive research in this topic (Domain Driven Design used together with Clean Architecture): DDD: Where to place domain event handlers? And I'...
0
votes
0answers
144 views

Why do I define my Queries, Data, and Mutation as Singleton when using GraphQL in .NET Core?

Why do I define my Queries, Data, and Mutation as Singleton when using GraphQL in .NET Core? From the doc's dependency injection page: public void ConfigureServices(IServiceCollection services) { ...