Questions tagged [.net-core]
.NET Core is a lean, composable and cross-platform framework for building web and cloud applications. It is fully open source and available on GitHub (https://github.com/dotnet/core). Applications in .NET Core can be run and/or hosted on Linux and MacOS under .NET Core.
97 questions
9
votes
9
answers
3k
views
How to choose between brute force and efficient solution that has overhead?
Using Big O notation, it is clear that I should go with the more efficient approach, but I know that there is a significant cost in terms of initialization for more efficient solutions.
The Problem:
...
0
votes
1
answer
141
views
How to test load balanced ASP Core based website?
I have a simple ASP Core based website that is connected to my local SQL Server Express, some of the third party plugins used, do have reliance on other products i.e. scheduling timers.
I would like ...
2
votes
1
answer
179
views
Should I split endpoints by parameter requirements?
Preface: This will not be available publicly or to third parties, so I am not concerned about users having the background knowledge to properly form GET requests. These are also not only analytical ...
0
votes
5
answers
474
views
Simulating different times of day when running integration tests, .NET/XUnit
I work on an organization's internal .NET Core 8 application where various dates are stored in different canonical formats, and some comparisons (checking that the current moment falls between a data ...
4
votes
4
answers
820
views
Is it okay to deploy both front end and backend everytime if they are in a single repository
I have a project with .net core web api backend and angular as front end.
I have single repository for both the projects with front end and backend in their own separate folders.
I have written ...
3
votes
1
answer
435
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-...
2
votes
3
answers
195
views
Polling Application Misses 1/500 records from an OData Feed
I apologize in advance for the lack of knowledge. Please feel free to edit this question to use the appropriate terminology if it is not correct.
I recently wrote a .NET core application that is ...
4
votes
2
answers
1k
views
Is the entire web request the right scope for a DbContext in EF Core?
The usual advice for using EF Core in a web application is to use a scoped DbContext per HTTP request. This is even the suggested default for web application in the Microsoft documentation. I recently ...
0
votes
0
answers
297
views
Azure Service Bus: consume messages from multiple subscriptions vs forwarding messages to a single input queue
I'm designing an Azure Service Bus topology with multiple topics. Each topic is associated with a single message type: this is possible since we have a limited number of message types, each one with a ...
-1
votes
3
answers
285
views
Possible Solutions for avoiding applications sharing database
Background:
I work on a small group (5-10) of lightly used .Net web applications.
The applications typically have dedicated databases, but there are instances of an application accessing another ...
0
votes
1
answer
234
views
Where to put the reference to Application Insights in an application designed with the Clean Architecture template?
We are implementing an application by trying to follow the Clean Architecture template for C#.
Our application is an ASP.NET core web api and we want to implement the observability for that ...
0
votes
1
answer
342
views
How to organize "master" data VS "working" data in MS SQL
I have this survey software that I'm writing and I'm wondering what would be the best design for my requirement.
I'm going to simplify it as best as I can.
I have these entities:
class Survey {
...
5
votes
3
answers
4k
views
In .net 6 dependency injection and Program.cs, what is the best practice for handling a large number of dependencies?
I've seen a ton of examples of how to do DI, and the example always shows two dependencies. But what about when you have 50 or 100 dependencies (or more) in a large-ish application? The Program.cs ...
2
votes
3
answers
515
views
C# Duplicated usage of an if/else condition and a ternary operator. A good practice?
I had a debate with a work mate regarding the following code as to which one of it would be the better practice:
My code (in pseudo):
var A = <precondition either TRUE or FALSE>;
var B;
if(A)
{
...
0
votes
1
answer
101
views
Good approach to design Business interface for versioned API?
I am designing an API using .NET core 6 C# which has 2 versions. For v1 I have something like the following for the business logic interface (fictional names and simple fields just to facilitate ...