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++.

Filter by
Sorted by
Tagged with
1
vote
1answer
32 views

Communication mechanism among windows or pages WPF

I work with C# and WPF and not using MVVM approach. One of the important part of applications is communication among Windows Pages and UserControls. In MVVM they do it behind the scenes and let you ...
1
vote
2answers
74 views

Prove that Feature Flags turned off Items in Production Environment

We want to implement Feature Deploy Flags, so Development Application Environment will have a new Product feature Toggled on. And Release and Production Environment Webpage, it is turned off. Its ...
2
votes
2answers
83 views

Is it right way to make Window to Singleton and call Visibility and Shutdown() methods directly in WPF?

There is a parent window that is the basis of the program, and there are several sub windows under it. Editor is one of the sub window and I'm making it. The code is as follows: // This is Code-Behind ...
-1
votes
0answers
33 views

Get Service Name running the Console Application in C#

I have a console application that I want to run as a service.The console application reads the data from MSMQ (Each data point in MSMQ has its unique ID) ,if any and proces it accordingly. I am ...
0
votes
2answers
166 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 ...
-2
votes
2answers
78 views

How to Mock NamedPipeClientStream

I created a class called MpvController to handle communication protocols over a .NET NamedPipeClientStream. Now, I need to test this controller. I have a second class named MpvControllerFactory that ...
1
vote
1answer
88 views

Adding item (or incrementing count) to ListView, with the MVP pattern in WinForms

Description A WinForms application with the following as part of a form: When the "Add" button is clicked, a new entry is added to the ListView, with data from the TextBoxes and ...
-2
votes
1answer
101 views

How to do achieve parallelism in a console application

I have a .net web application, let's say A and a .net console application, let's say B.In A, I have a queue with multiple jobs to be done by B.Once I select the jobs from A, a queue gets created. Each ...
0
votes
2answers
205 views

C#: Use Double Await Cause Issues?

We have Application service Method, which extracts data from SQL database using Entity Framework Core . Its Async method along with the Async Controller. Service: public async Task<IEnumerable<...
6
votes
3answers
212 views

What are the benefits of multiple projects over namespaces in a solution?

I have been tasked to set up a guide for a microservice solution structure and find myself reflecting on why exactly I do things the way I do them. I am struggling to find an answer to the question ...
1
vote
2answers
115 views

Is this approach with JWT tokens wrong?

I have .NET Core WebApi application with JWT token for authorization. I also have roles and permissions. To make it more flexible for end user, I decided to make permissions like this: [Authorize(...
4
votes
2answers
156 views

How to mock a class not implementing an interface or having virtual methods

I'm trying to write unit tests for business logic classes I have control on, but which operates over some services that are not designed with the testability in mind. Currently I’ve extracted the ...
3
votes
3answers
482 views

Do I need to know about the history of the web and .NET?

As a .NET developer (for 5+ years) some times I think I should know all about the history of the dot net and also how the web was formed. However, I overlook the question by some justifications which ...
-2
votes
2answers
84 views

Software Architecture: Repository Data grabs all the Data

We have the current software pattern below. Sql Server Db --> Repository --> Domain Layer---> Dto Layer The Dto layer filters sensitive data, and brings only required domain data to client ...
0
votes
0answers
27 views

Migrating an application using a custom API logging system

I'm turning a VB6 application into a VB.NET (using a migration tool). This software relies on a custom DLL which handles logging. This DLL logs to flat files and optionnaly in a GUI component. Also ...
6
votes
1answer
181 views

.Net Semantic value of a “Project”

I've been working with C# and .Net Framework for a little more than 1 year. When I arrived on this project, there was already someone who laid the solution/projects structure and his approach was &...
2
votes
1answer
244 views

Multiple HttpClients in .NET Core Console Application

I'm building a .NET Core class library wrapper for a REST API that, ideally, could be used in both console applications and ASP.NET Core web applications. So far, I've based development on supporting ...
0
votes
1answer
35 views

Best place to map Model got in ActionMethod

I'm not sure this question matches this forum's purpose, but I didn't think it should belong to the stackoverflow one either, so here it goes: I created a model binder that makes one mapping so "...
-1
votes
2answers
90 views

Should Developers Conduct Sanity Testing in Public Dev Environment, if they Tested Locally and Wrote Unit Tests?

Should Developers conduct Sanity Testing in Dev Public Server, before sending code over to QA team? We are developing a Property Application. Our company utilizes C# .Net Core with Angular, and ...
4
votes
2answers
234 views

Incorporating immutable signatures in C#?

I realize this is a subjective question, but after studying F# and functional programming I've seen the benefits of immutability. Now, I'm thinking of getting rid of mutability entirely in C# unless ...
-2
votes
1answer
43 views

How to organize my controllers in projects in .Net API?

I'm working on a project that is a API with many controllers and modules. Which of the following is the best architectural practice to organizing my API controllers by dll (.NET 4.7 WebAPI)? Why? ...
3
votes
2answers
153 views

Alternatives to distributed transactions in .NET?

Lately, I've been working on a project which basically is a huge rewrite in .NET Core F# + Event Sourcing + PostgreSQL of an old sub-ledger legacy app written in .NET 4.6 C# + SQL Server. Since the ...
0
votes
1answer
101 views

Email via a Microservice

We currently have a monolithic code base which we are in the process of extracting some micro-services where it's obvious to do so. One thing that stands out is our email delivery. We have numerous ...
0
votes
0answers
56 views

Use of SQL Server with DDD in ASP.Net Web App

Hi I need to develop a new web application for my company and I must use DDD as per my senior-dev requirement. In addition I'm maintaining (adding new features and fixing bugs) a large brownfield web ...
0
votes
0answers
64 views

.NET core: Independent view model and domain vs. common data annotation via ModelMetadataType and interface

I'm building a .NET core/standard application that should support different UI platforms (ASP, API, Winforms/WPF). Rich domain model is perfect for databinding in winforms and WPF by itself. However, ...
2
votes
3answers
130 views

Changing control name property during runtime — Why doesn't anything break and why shouldn't I do it?

To make a long story short, I needed a property of a button to act as a "secondary text property" and retain the original .Text value of a button, and the only String property that wasn't ...
1
vote
1answer
202 views

Why no async functions for Utf8JsonReader and ReadOnlySequence

I have used Utf8Json a lot (it is very good) but have since adapted some lower level code and started using Utf8JsonReader directly. Looking into the code of the Utf8Json library, I see ...
0
votes
3answers
360 views

How to design a statically typed REST API client?

Last time I used I created a REST API client in .NET I used exceptions to represent status codes which don't indicate success. (404 was returning null). It's been quite some time since then and my ...
0
votes
0answers
21 views

Defining componentcontracts (XSD) manually in a large organisation to facillitate communication between componentteams feels bad

We have 22 (.NET, webservice based) componentteams each consisting of atleast 3 developers and 1 buisiness analist. To make sure every one of the 22 components integrates without trouble, we work what ...
-2
votes
1answer
35 views

Capture webhooks of third party service with an API

I'm building an API in .net that wil capture webhooks events of a third party service. Lots of actions on the third party service will trigger the webhooks. account.deactivated", "account....
-1
votes
1answer
50 views

Configuring Controllers and Endpoints in a HTTP API

Let's say you need to create an API around machines, and you want to be able to query machines many different ways: Get List of all Machines Get Machine By ID Get Machines By Client Get Machines By ...
4
votes
3answers
434 views

Single massive solution - good idea?

I am analysing a Windows Forms application in .NET Framework 4.5.2 with 4 separate solutions with a combined 1.5million lines of code (and 10 years of development) Libraries.sln (54 projects) Tools....
-4
votes
2answers
113 views

Implementing heartbeat in terms of best practice

I have a web application that is running under .NET framework and that is using JS/JQuery on the client side. I am the owner and the only developer of this web application, and it is not totally under ...
1
vote
1answer
152 views

Unit testing an existing project by creating interfaces for all public classes (including GUI forms)

This is an existing C# .NET WinForms project. I assume it was not developed with unit tests in mind from the very beginning. It uses a Model-View-Controller architecture, and the backend is a content ...
5
votes
2answers
2k views

Best Practice for Adding an Additional Parameter to a Function

I'm currently working with a very large system and have been asked to add an additional parameter to a method that's called from over 200 different places directly. The method signature looks ...
6
votes
3answers
1k views

Is the C# EventHandler designed the wrong way?

State of the union: C# Events/Eventhandlers are: blocking throwing Exceptions sequential deterministic executed in order MulticastDelegates a handler is always dependent on the behavior of the ...
0
votes
1answer
33 views

data model design of a store net sales and earnings

I've designed my app so it stores the data of each sale in the following way: each order contains different products so for each product in an order a table stores the quantity(of the product) , net ...
6
votes
4answers
593 views

Performance: Is There a Reason to Use Processes over Threads?

This is a general question but I work in the .NET world so I'd like to know if there any specific quirks about the .NET Framework / Core platforms that I should be concerned about here. I think it's ...
1
vote
2answers
131 views

Separate database in microservice architecture

I'm trying to create project siteWeb and mobile app with clean Architecture and Microservices. create identity service with separate database A and make another api service with other database B. for ...
2
votes
3answers
158 views

Micro services communication among them

I am converting a monolith to micro services architecture using RESTful apis using C#. I have identified various micro services that will completely represent my monolithic application. One important ...
-1
votes
1answer
78 views

Use two parallel instances of the same .NET assembly

I've have an n-tier .NET 4.6 internal business application. It has a business logic layer class library project that references a data access layer class library project. It's designed to decouple the ...
-3
votes
1answer
247 views

.Net Core Dependency Injection is an example of anti-pattern?

I want to use Dependecy injection in my new .net core project, but my manager thinks it is an anti-pattern usage. I already know benefits of dependency injection. But my manager cares architecture ...
0
votes
2answers
166 views

Avoid framework lock-in with dependency inversion

I am trying to understand the concept of dependency inversion and I think I finally got the concept. However now I am struggling with another issue, which is the selection of framework, when ...
6
votes
4answers
1k views

Functional programming - what to learn and who uses it

I'm a .Net and Angular developer who's been working with OO languages throughout my education and work history. Lately I've been thinking about spending some time with one of the functional ...
2
votes
1answer
158 views

Correct approach to DDD?

I'm wondering if I'm using the correct architecture in my application. After calling an endpoint in my API, I'm currently going through the following flow: Api.EmployeeController.Update(Api....
0
votes
1answer
54 views

MVC database connection .NET

Introduction I intend to create a .NET WinForms application (this will be a toy application) which connects to a SQL Server database backend. I have designed and implemented an object-oriented model ...
0
votes
1answer
86 views

Unit testing async tcp server

I built an async multi-client TCP server for RPC usage. It's working well but I've found it difficult to unit test certain functionality: Connect 2x clients, is client count 2 Connect 1x ...
0
votes
1answer
112 views

GraphQL results in a very large Query and Mutator file for Enterprise Monolith

I am investigating a good maintainable architecture for GraphQL. In particular we want to migrate a REST app to GraphQL. Specifically I am using .NET. I am following the tutorial here: https://...
1
vote
0answers
122 views

Application Service Layer referring to two Layers, and Database Entity Copy Layer with DTO Layer?

I am trying to review our current architecture. These are the current layers, trying to analyze them, and see if the following three ideas are good practice. DatabaseSQLStorage ---> Entity Framework ...
2
votes
2answers
155 views

Copy Database Entities into Another Layer in Software Architecture?

We are using Entity Framework with SqlServer Database. Business program needs to create many columns which are not in the Database, due to storage, high querying cost etc. Currently, the team is ...

1
2 3 4 5
28