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
6
votes
3answers
149 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 ...
0
votes
2answers
107 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(...
3
votes
2answers
138 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
2answers
395 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
82 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
177 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
152 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
86 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
232 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
42 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? ...
2
votes
2answers
114 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
73 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
54 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
52 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
128 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
137 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
353 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
20 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
49 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
429 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
101 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
133 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
906 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
31 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
504 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
117 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
232 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
164 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 ...
5
votes
4answers
847 views

Functional programming - what to learn and who uses it

I'm a .Net developer and Angular 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
157 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
52 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
64 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
100 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
110 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
149 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 ...
2
votes
1answer
67 views

What are some authorization based design patterns to limit functionality from the perspective of size or amount of data?

I am well aware of role based / activity based authorization in the context of limiting user functionality in a simple on/off manner; however, the problem gets difficult when it's not so black and ...
1
vote
2answers
114 views

How to concat lists with logical ANDs and ORs

Having multiple lists of integers, like e.g.: var p1 = new[] { 3, 9, 5, 8, 9 }; var p2 = new[] { 12, 1, 18, 27, 103, 99, 4 }; var p3 = new[] { 23, 930, 15 }; // ... I want to concatenate them with ...
1
vote
1answer
42 views

Managing Multiple Applications With Similar Configuration Files

From the .Net perspective (C#, VB, etc.) and MSSQL, I have noticed that for a set of applications (maintained by the same development team) typically have the same defined configuration for connecting ...
8
votes
3answers
935 views

How can we avoid showing the literal path in the exception's stack trace?

When our in-house developed application (C#, ASP.NET) is throwing an exception, it displays a stack trace that contains path information like C:\users\DEVELOPER_FULL_NAME\path\some-module.cs. So it ...
0
votes
1answer
68 views

Best practice for populating a property of an entity object which requires a second database call

I'm running a commercial accounting software packages which uses a SQL server database. I've also developed a WPF application which is basically a slimmed down version of the commercial software. ...
0
votes
1answer
39 views

Appropriates names for Api implementation and Api Client Library

Suppose I have a big project, called Northwind. It's a website in front of a database. Now management want me to create a public API for this. I create a new ASP.NET Core project called Northwind.Api ...
1
vote
2answers
147 views

Is there still a place for non-async methods in Data Repository?

If we start a .NET Core 3.0 project today, which will use database connection (for example ASP.NET Core Web API), is there still a place for non-async operations while talking to the database? Or in ...
0
votes
1answer
535 views

Managing .resx resources files for multiple languages application

I am currently developing a software for a multi languages environment using visual studio (en, fr and es). The soft is some kind of a 3d configurator, if I take the exemple of a car configurator, the ...
1
vote
0answers
39 views

“Add-On” Projects and ASP.NET Core with Entity Framework

I've created a .NET Core MVC product with Entity Framework, and am being tasked with creating "Add-on" products, which give CRUD operations to more tables, but use the same library functions and UI. ...

1
2 3 4 5
28