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.
92
questions
3
votes
1
answer
69
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
172
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
467
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
56
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
144
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
110
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
204
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
2k
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
391
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
76
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 ...
1
vote
0
answers
218
views
What design pattern does this implementation follow?
For a middleware solution I expose an API, which processes data and sends the necessary information to different parties.
In the current design we create a new client, which acts sort of like an ...
-3
votes
3
answers
436
views
Can be logic around `List<T>.Enumerator._version` considered control flow exploitation?
List<T>.Enumerator “snapshots” list version upon creation by _version = list._version;. This allows enumerator to halt enumeration when List<T> changed during it.
This behavior likely ...
1
vote
0
answers
263
views
Microservice code reuse strategy for static classes
Hope this is the right place to post an opinion-based question like this. I'm in the process of converting an aging API monolith to a set of .NET 5/C#-based microservices and working on the code reuse ...
0
votes
0
answers
44
views
Synchronisation of db state in blazor
I have an app where certain data is stored in the database. Multiple users access the same set of data (similar of a collaboration tool). However, they can non deterministically work on stale data. ...
0
votes
1
answer
264
views
DDD+CQRS - Should I always check if the Databases are online?
I'm developing an intranet application and I'm trying to use some concepts from Domain Driven Design (DDD) and Command and Query Responsibility Segregation (CQRS) in .NET Core, with EFCore.
But, to ...