Questions tagged [.net-core]
.NET Core is an open-source, modular implementation of the .NET Framework. It can be used in a wide variety of applications and verticals, ranging from servers and data centers to apps and devices. .NET Core is supported by Microsoft on Windows, Linux and macOS.
93
questions
2
votes
1
answer
112
views
Simple priority task scheduler implementation
My project I am working on requires the following functionality for the processed messages:
each message has a priority
messages with higher priorities should have precedence over the ones with lower ...
1
vote
2
answers
403
views
Thread-safe int wrapper in c#
My system is a .NET Core 7 console app, which starts some background threads. I need to pass some int values (counters, etc.) between the main and background ...
1
vote
2
answers
87
views
Refactoring duplicated installation code
I have the following classes:
...
4
votes
2
answers
139
views
Classes are using interface to send different messages to a console in C#
This is a follow-up of my thread in Class SettingView sending messages to a console in C#.
Here is the whole project on GitHub.
The starting point
After attending ...
1
vote
2
answers
186
views
Class `SettingView` sending messages to a console in C#
My challenge is to transfer examples from textbooks or videos into something I am coding on my own.
Environment
Visual Studio 2022
Net 7.0
ConsoleApp
My goal
My idea is to have a solution to provide ...
3
votes
3
answers
594
views
Algorithm to find sequential ID gaps in List<long>
I had to develop an algorithm that will find gap between sequential Ids within a List<long>.
For example as input we had the following ...
2
votes
1
answer
4k
views
HttpClient retry handler on response 429
When the remote server returns a 429 (Too Many Requests) response with the Retry-After header, the HttpClient can handle such cases with a handler:
...
4
votes
2
answers
226
views
Automating the process of determining which boxes to load on each flight for freight company
I was given a test assignment for the interview of the company and below is the code that I shared with them. I developed it using .NET 6 (Core) Console application.
Actual problem statement:
Coding ...
1
vote
1
answer
143
views
Azure DevOps Git: Fork into another Repo using Azure DevOps REST API
In my Azure DevOps Project, I have a Git repository that I would like to copy to another Azure DevOps Project.
In other words, I should be able to copy the original repo into other Azure DevOps ...
2
votes
2
answers
640
views
3
votes
1
answer
273
views
Export and import work items from Azure DevOps
I'm working on an application that exports and imports work items from Azure DevOps. To import work items into Azure DevOps, I have written the following code.
Would you be able to review and make ...
2
votes
1
answer
2k
views
.Net Core 6.0 : Entity Framework - Either Or / Neither Nor / Both in Where clause
I am building a .Net Core 6.0 application that uses Entity Framework.
I have situation where I need to apply the filter(Where clause) based on two properties (eg: Guid? skillType, string skillName). ...
1
vote
0
answers
299
views
Update a gamer and its child objects using Entity framework 6.0 [closed]
The below logic is working fine. But is there any way to optimize this logic ?
Gamer is the root level object, it will have Characters. Character will have set of Skills & a weapon
I want to ...
1
vote
0
answers
767
views
Hangfire context constructor injection
I tried following IHttpContextAccessor pattern but for Hangfire context. What I'm mostly interested in is CustomScope class with Resolve method. I'm using ActivatorUtilities there because otherwise I ...
3
votes
2
answers
152
views
RawSqlQuery minimizing risk of field name confusion
Is there a way to make the following code more maintainable?
...