Skip to main content

Questions tagged [.net]

The .NET Framework is a software framework for Microsoft Windows operating systems. It includes an implementation of the Base Class Library, Common Language Runtime, and Dynamic Language Runtime. It supports many programming languages, including C#, VB.NET, F# and C++.

0 votes
1 answer
75 views

Automated Testing classes with an injected DbContext [duplicate]

I've been working on an implementation of a service, and have found that there are a number of operations where I need to read from a database to provide a caller with certain data or objects. In-line ...
Lily Smith's user avatar
0 votes
1 answer
155 views

GitHub workflow for .NET desktop apps that supports CI/CD and entity framework

We want a GitHub workflow that syncs EF migrations across all branches and automates ClickOnce desktop app deployments. The key requirements of this question are highlighted in bold at the bottom. ...
EMN's user avatar
  • 795
1 vote
1 answer
247 views

How to manage connection strings for CI/CD and local debugging that works for .NET Framework web apps and desktop apps?

We want CI/CD to inject the production connection string into a .NET Framework app.config during deployment. In source control, we only want test/staging DB connection strings. Developers should ...
EMN's user avatar
  • 795
2 votes
2 answers
260 views

How should multiple ViewModels communicate in a larger WPF MVVM application?

I’m working on a WPF MVVM application that has grown beyond just one or two User Controls. I now have multiple ViewModels that need to react to each other’s actions (e.g., selecting a customer in one ...
Sam's user avatar
  • 29
1 vote
3 answers
236 views

Should HTTP clients be encapsulated in a C#/.NET library?

I have a C# library that contains all the logic to send requests to a remote endpoint, including marshalling/unmarshalling and encrypting/decrypting requests and responses. It contains an HttpClient ...
hyt's user avatar
  • 121
2 votes
3 answers
1k views

Scope of integration tests

I'm programming a .NET WebApi application from services. What is the scope of an integration test within the following schema? Order creation scenario: Order is created -> stored in db -&...
Petr Klekner's user avatar
0 votes
2 answers
334 views

C# - Entity handler correct use clean code

I have a question about setting up my service. My main concern is if the design is clean and in order. Whether it meets the SOLID principles and does not spill out on me. I have entities like order ...
Petr Klekner's user avatar
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 ...
user avatar
1 vote
0 answers
104 views

Implementing ServiceLocator in middleware

Before I begin, I'm aware the Service Locator pattern is not recommended and it's better to inject services into the classes where they are used. However, I have a large legacy codebase that creates a ...
Steve's user avatar
  • 119
1 vote
5 answers
409 views

Conventions and separation of concerns for controllers

I am currently working on a project using .NET APIs and have a few questions regarding controller design. Specifically, I have separate controllers for users and orders, and I am considering the best ...
Lemon juice's user avatar
1 vote
1 answer
159 views

ASP.NET MVC and Web API Together vs. ASP.NET MVC with JSON-Returning Action Methods

In an ASP.NET MVC application with views that make AJAX calls for widgets like dropdowns and data grids, is it better to use Web API controllers or regular MVC action methods that return JSON? The ...
EMN's user avatar
  • 795
10 votes
7 answers
4k views

Does memoization skew benchmarks?

I'm writing a program that works with directed acyclic graphs and performs rewriting operations on them. Sometimes the graphs are small, sometimes they can be very large and grow as the program ...
Foxy's user avatar
  • 621
3 votes
1 answer
410 views

Clean Architecture using interfaces or Mediator approach?

I'm starting a new project and I want to follow a Clean Architecture(ish) approach. I've modeled my projects in that manner (attached diagram). For the API I'm using FastEndpoint since I like it, it'...
developer82's user avatar
2 votes
2 answers
492 views

Advanced Scenarios in Clean Architecture

We have a very complex and mature ASP.NET web application that is about 20 years old and has 5 million lines of code spread across roughly 30 project in a single monolithic solution. It's running on ....
Pavel's user avatar
  • 123
-2 votes
1 answer
226 views

Transaction Management Across Microservices with Rollback Mechanism using Kafka

I am currently developing a microservices architecture consisting of two services, and I'm facing a challenge related to transaction management and error handling. Microservice A: This service is ...
Oleg Pro's user avatar

15 30 50 per page
1
2 3 4 5
99