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
0
votes
0answers
13 views

Moving from IUnityContainer to IServiceCollection and injection based on name

There are many RegisterType overloads with string for the name in Microsoft.Practices.Unity. Now we are moving toward Microsoft.Extensions.DependencyInjection.IServiceCollection. And there are no ...
0
votes
1answer
59 views

How can I implement Windows close in MVVM pattern? [closed]

I'm newer to MVVM design pattern with WPF .Net Framework I have a : Model ( Student ) View Model (StudentViewModel ) RelayCommands MainWindow.xaml.cs MainWindow.xaml Everything works fine and I have ...
1
vote
2answers
80 views

CQRS: Is it an antipattern if the Command invokes a database interface which contains business logic?

Martin Fowler states that, Command module executes validations and consequential logic which aligns with every CQRS demo app that I've studied. That is to say: validation -- does this Jedi exist? -- ...
-3
votes
1answer
119 views

why controller lifetime is transient by default in asp.net core? [closed]

I know the lifetime of the controller class is transient by default, but I think it's better to be singleton. should explain to me why creators choose transient instead of singleton or scope lifetime? ...
-2
votes
1answer
56 views

Why running migration turns into timeout in a production environment?

I know this is a theorical question since i don't have code to or any logs to show, but i hope that someone can give me some idea on this question. The problem in question was the following: On my ...
2
votes
1answer
104 views

Strategies to organize multiple projects which may reference each other and managed by different teams in Git?

First actually I don't think Git is a specific involved tool here, it can be any other Source/Version Control tool (TFS, SVN, ...). The point here is how to deal with the scenario in which I have ...
-3
votes
1answer
56 views

Inter application communication .Net

I have multiple WPF applications running different programs some of them are interconnected so one might have to start another at some stage. I need a way to communicate and share large amounts of ...
-1
votes
2answers
129 views

How to avoid CRUD and layered architectures in REST backends?

I'm creating a .Net 5 API backend and use EF Core for the database part. The simple CRUD way I know: API layer calling a command or query from the application layer using MediatR Application layer ...
-1
votes
1answer
48 views

Implementation of concurrent purchase for unique items

I am building an API for webshop. I need to implement following scenario: There are x (let's say 500) digital items, which will have same price (let's say each item costs 10$), but unique serial ...
1
vote
0answers
49 views

VM-images: how protect time-license programs?

One big customer asked me to supply my program to run within a balanced VM-images structure; I mean, the program will be recorded into an image which will be launched in "instances" to ...
0
votes
1answer
115 views

Where to put SaveChanges in unit of work?

For the sake of discussion, you can assume I'm using Entity Framework and a mediator pattern implementation in .NET. I'm going back and forth trying to decide how to structure some of my data access ...
0
votes
0answers
22 views

Should I create separate package to host web api as windows service in .net core 3.1?

Some background : I have common Web API library which adds Serilogger and Splunk integration/implementation for ILogger along with handling of common services/Middlewares such as Custom Authentication/...
-1
votes
1answer
67 views

Allowing end users to upload a large amount of data using Excel

I've read Allow users upload CSV files, and embed the data for a simple API , Importing large data sets into a database over the web the closest concept is Is there a way to efficiently allow a user ...
-1
votes
1answer
92 views

Version control organization for large .NET solutions

I'm trying to come up with a better way to organize my C# projects on SVN. The .NET solution for my main GUI has about 28 class library projects. These libraries fall into two categories. Some of them ...
0
votes
0answers
14 views

Binding checkboxlist on top of another model

I have a Customer and a Brand ViewModel public class CustomerViewModel { public int CustomerID {get;set;} public string Name {get;set;} public ICollection<Brand> Brands {get;set;} } ...
-2
votes
2answers
81 views

Ideas for implementing a hardware interface

I am looking for alternative ideas of how to implement the following situation (.NET Core, C#) Having multiple sensors that communicate over a RS485 interface with the host. Each sensor is implemented ...
1
vote
0answers
37 views

How to implement timing-mechanism for fantasy draft process utilizing ASP.NET Core 3.1 SignalR

I have developed a Fantasy Draft system utilizing ASP.NET Core SignalR, along with Azure's SignalR service (for backplane/scaling stuff). Last year I utilized a poor-mans' javascript version that just ...
1
vote
2answers
178 views

Why it is possible to specify a value comparer for ImmutableDictionary<TKey, TValue>?

What is the intended usage of the ImmutableDictionary<TKey,TValue>.ValueComparer property? Why is it useful being able to compare dictionary values by using a specified equality semantic? I ...
0
votes
1answer
150 views

DbContext lifetime in desktop app with SQLite

I am creating a small data-driven desktop application using .NET 5 with WPF, ReactiveUI, Dynamic Data, and EF Core 5. The app uses a local SQLite database to store all persisted state, and relies ...
1
vote
1answer
44 views

Custom File System Index/Cache - How to save index

I've got an extremely oniony(deep) folder structure which contains Appx 1,000,000 text-based files on a network share. Using windows search is extremely slow and unreliable. I've created some text ...
1
vote
1answer
104 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
115 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
102 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 ...
0
votes
2answers
230 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
121 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
197 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
105 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
355 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
853 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 ...
2
votes
3answers
215 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
1k 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
489 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
88 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
185 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
1k 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
49 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
136 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
237 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
90 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
732 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
479 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
62 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 ...
2
votes
3answers
143 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
486 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
448 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 ...
-2
votes
1answer
38 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
66 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 ...
5
votes
3answers
480 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
380 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
2 3 4 5
28