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
206
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-...
0
votes
1
answer
206
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 {
...
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
522
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
57
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
149
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
119
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 ...
-3
votes
3
answers
1k
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 dependent upon the version of .Net Core installed on the ...
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
2k
views
Why is it allowed to refer .net framework libraries in a .net standard library?
.Net Standard is specification.
There are two popular implementation of the .net standard specification. ie .Net Core & .Net Framework
When I create .Net Standard library, I am allowed to refer ...
10
votes
3
answers
7k
views
ASP.Net Core: ViewComponent vs EditorTemplate/DisplayTemplate vs @inject
So I was searching for a good way in ASP.Net Core to create some "controls" that render into a view. So far I found there are 3 options, and I wanted to get some feedback on them.
ViewComponents: ...
2
votes
3
answers
395
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 ...
-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 ...
5
votes
2
answers
17k
views
Unit Of Work with multiple database context
I have created an application (net core 2 & ef core) with Unit Of Work and Generic repository pattern. I used to have one database context but due to some business logic I had to create a second ...