Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

-1
votes
1answer
43 views

Clean Architecture and Microservices

Our team is in the planning stages of creating an enterprise solution for our back office. Our goal is to have one singular entry point for common tasks, such as changing an address or reprojecting a ...
0
votes
1answer
46 views

Entity Framework and static entity instances

I'm always having the problem on how to properly design having static entity instances and it being attached to Entity Framework's Dbcontext. For example, we have the following: using Microsoft....
-2
votes
1answer
14 views

Migration Of Demo Version Projects to Live Version in .Net MVC Applications

I have an application which is currently used by clients. So based on the feedback from the client, normally we are fixing bugs in a live application.Parallel I am adding new modules to demo projects....
-4
votes
0answers
47 views

C# SignalR and risk [closed]

Is using SignalR opening holes in security? And, also if it is heavy and load on server if lets say there are 1000 users at a time? Can anyone advise on what is good and bad approaches when using ...
-2
votes
1answer
106 views

How to implement HTTP PUT correctly

I'm really looking for one good example how to PUT operations should be implemented correctly. What I understood until now: The operation must be idempotent When the resource doesn't exists it will ...
3
votes
1answer
63 views

.NET shared libraries across team, using TFS and auto-NuGet publishing

My team and I had a discussion about our future architecture, since we've always just written the code that was needed in each separate project, which have now led to extremely redundant code across ...
0
votes
1answer
45 views

How would I use Azure Container Instances to parellelise a task?

I currently have a file processing task that runs on an on-prem VM, it's a .NET executable that also calls other services such as ffmpeg (for videos). As is, the task runs fine, but it's really only ...
1
vote
1answer
43 views

.NET Core Microservice messaging with Amazon SNS and SQS

So I've done some searching but can't seem to find a whole lot of suggestions on this topic. My question is what are some opinions on the best way to receive messages from an Amazon SQS queue on a ....
2
votes
1answer
53 views

Strategies for managing a dynamically sized pool of worker processes?

I have a problem to solve that's very much like a thread pool, and I was hoping to hear some strategies or find some resources to information on managing the size of the pool. Let's say I have the ...
0
votes
0answers
12 views

Pass Data From SSIS To External Component

I currently have an SSIS package whose final task is a Script Task which works with data in a DataTable. I need to add the following functionality: Execute an external batch component that will use ...
1
vote
2answers
41 views

Encapsulating Permissions Logic, but looking to Avoid Circular Dependency

I'm trying to encapsulate permissions logic for a particular view model in a way that the permission logic has access to the view model object, but is also exposed inside of it Trivial Implementation:...
2
votes
1answer
140 views

Is my Architecture correct?

I have a question about architecture in .NET. My architecture is like this : Projet : - DAL (Data Acces Layer) - BLL (Business Logic Layer) - DTO (Data Transfer Object) - IHM (man/machine ...
0
votes
3answers
139 views

How can I interpret a SQL Check Constraint inside my C# .NET class libary?

I was given a more or less complex task. The goal is to interpret a SQL Check Constraint inside my C# .NET libary. In our case we have a simple UI that displays what is inside the database. We do not ...
0
votes
1answer
242 views

How can I get rid of this antipattern

I have a main window and I amgetting data from http client service while form load. public class MainWindow: Window { private IClientService service; public MainWindow(IClientService service)...
1
vote
1answer
87 views

Problem with business and data access layer design

I am creating a library to interact with third party api.This library will be wrapper around that third party library and i want to expose my wrapper methods to client(webapi,winform,console,mvc etc..)...
0
votes
1answer
42 views

Distributing C# Dlls to Customers on Application Install

I am currently working on a software library that will be used to develop Class Libraries. These class libraries can be run by our application running on the user's machine The application uses the ...
0
votes
1answer
151 views

Am I breaking some Onion Architecture rule?

Based on the project structure below i will have some questions Domain Layer 1) MyApp.Domain.Entities (DLL) Product.cs PagedResult.cs Referentes No References 2) MyApp.Domain.Interfaces (DLL) ...
-1
votes
1answer
51 views

What are pattern and practices or frameworks for Managed Extensibility Framework? [closed]

Are there any frameworks for using MEF, for example for WPF application there are number of frameworks to save time, but what is there for MEF? are we to start every MEF application from scratch or is ...
0
votes
2answers
207 views

Naming conventions for .net C# Unit test projects for better sorting [closed]

I currently use the following naming scheme for my unit test projects.. if I have a project "MyApp", I will have.. -- MyApp -- MyApp.Tests I see this is quite a common practice. Now, the problem is,...
3
votes
3answers
240 views

what is the best way to write a recurring code with different enums

Basically what this code does is to determine whether the user is allowed access to the page or not from list of pages as enum, each one has the role name as its name and the page name inside it. The ...
2
votes
0answers
88 views

How can I resolve circular dependency within service layer in a n-tier architecture system?

I am currently starting a new project with a 4-tier architecture design. The layers is set as follow. +------------------+ +---------...
1
vote
0answers
21 views

DataTable Processing: Want lowest result

(Hi there, not entirely sure if this is the right place to ask, sorry if it isn't!) I am knocking up a fairly quick and dirty Visual Basic.NET application that essentially is a DB UI for my day job, ...
1
vote
1answer
137 views

Using “On” at the start of a method name

From what I've observed, methods that start with the word "On" fall into two categories: A base class that defines an event will expose a protected method whose name starts with "On" followed by the ...
20
votes
3answers
736 views

What is the purpose of this apparent self reference in C#?

I am evaluating an open source CMS called Piranha (http://piranhacms.org/) for use in one of my projects. I found the following code interesting and a bit confusing, at least to me. Can some help me ...
3
votes
1answer
112 views

Regulations about collecting data from software running at clients hardware (apps 'phoning home') [closed]

We develop an application which has now been installed on a few thousand customers sites. Unfortunately, we have no customer data collection built into the software. This is something we want to ...
1
vote
2answers
71 views

Is it okay for async function to update a common object

I have a couple of functions, each function verifies a set of rules and updates a common object. The common object is just a container that holds a list of rules that passed or failed. I would like to ...
1
vote
0answers
54 views

Wrapper method for ConfigureAwait(false)?

Does it make sense to declare a async method as private and then create a public method to act as a wrapper that calls the private method with ConfigureAwait(false)? The intended purpose is design an ...
-1
votes
2answers
160 views

Argument for staying on Rails instead of migrating to .net MVC?

I work for a Rails SaaS platform that was recently acquired by a primarily Microsoft shop. They are pushing the issue we need to rewrite the entire application in .NET. It's very clear they know ...
-1
votes
4answers
325 views

Alternatives to Long Loops [closed]

I am part of a software team that is writing a console application (no UI) in C#. My part in the team is to write code to call RESTful APIs from a third party site, process the returned data and save ...
3
votes
1answer
149 views

Single responsibility of Program class in C#

I do not follow SOLID strictly in general, but I do try making sure to separate responsibilities of my classes. I was developing a small app with a Windows service powered by Topshelf and realized ...
0
votes
2answers
185 views

How to create secure desktop installer that doesn't trigger a virus alert for unknown exe?

When I created a c# desktop application and move the exe file to another computer that has anti virus security, the security program shows an alert as unknown exe. I want to create a desktop ...
-1
votes
1answer
117 views

Giving Viewmodels access to application wide Model in MVVM

I am practicing building applications using MVVM and WPF+C# by making a "finance application". The application contains several views with their own ViewModels. The views are in a hierarchy and are ...
3
votes
3answers
473 views

Multithreading ( thread per area ) for an MMO server, good idea?

As a personal project, I'm setting up a MMO, and writing the server in C#/.NET Core. As of now my architecture is as follows: The world exists of different areas ( you can go from area to area trough ...
4
votes
1answer
204 views

How to have multiple source copies of a dependency in a C# git project?

In our company, we develop information system software in C#.NET, which has client-server-module architecture. Module project does not depend directly on server/client project, but only on shared ...
41
votes
13answers
10k views

Is it unreasonable to expect Any() *not* to throw a null reference exception?

When you create an extension method you can, of course, call it on null.But, unlike an instance method call, calling it on null doesn't have to throw a NullReferenceException -> you have to check and ...
1
vote
5answers
610 views

Limits of Defensive Programming acknowledging that Exception Handling should be avoided

I've read Defensive Programming vs Exception Handling? and if/else statements or exceptions, but none contain something relevant to what I'm searching for. Taking into account that exception handling ...
3
votes
1answer
236 views

Reusing business logic layer in multiple applications

I have seen some people asking about sharing business logic with more than one application, and answers generally discuss putting it in a class library. I'm fine with that, but usually the examples ...
-3
votes
3answers
563 views

Shouldn't cost be good reason to migrate to .Net from Java

I have a RESTful services developed using Java Spring framework. It's not a huge application, around 12K lines of Java code. Front end is in Angular and DB is No-SQL world. Recently I came to know ...
3
votes
0answers
105 views

Using C# to implement an F# type provider

I am in a situation where I believe type providers would be useful. Consuming type provider in F# could be the way I finally dip my toes in F#. However, I understand that writing type providers is ...
-2
votes
1answer
216 views

Shared classes between namespaces, how to distribute them?

Some time ago I read from this book that namespaces inside libraries should be distributed in a way that inner namespaces have more concrete classes than their parent namespaces. We can find an ...
2
votes
1answer
110 views

Should namespaces within a single project act as boundaries?

When working within a single project that contains multiple namespaces, should these namespaces be treated as boundaries? Or is it acceptable that any namespace can access any other namespace? For ...
0
votes
1answer
165 views

How to handle API responds with DTO or Error Message

I have a mobile app and an API. The mobile app is set up to expect back a DTO from the API but has no information if an request was unsuccessful. This needs to be updated so that better messaging is ...
1
vote
1answer
138 views

What's stopping Cloud Platforms from owning the whole deployment process?

Although things have come a long way in recent times, in my workplace we're still talking about DLLs, containers, configs, substitutions, pipelines - all complexities when it comes to shipping code. ...
4
votes
4answers
200 views

Should custom exceptions live with the interface or the implementation?

I have an interface IMyService in a class library. I have an implementation of this interface MyService in a separate class library. MyService may raise a custom exception CustomException. Should ...
0
votes
1answer
91 views

How to run machine-specific tests during DevOps remote build

What are the generally accepted means of running tests that pass on the dev machine on the build server where they'll consistently fail due to missing dependencies? (In this case, a configuration file ...
1
vote
0answers
68 views

Is there a pattern/cleaner way of saving a large object with multiple nested classes?

I'm in the midst of a rather large project which involves decomposing a very old and large ColdFusion legacy application and creating some .NET services in it's place. Due to this, there are some ...
0
votes
1answer
78 views

Method for loading and running user defined code in .NET windows application

Are there any patterns that address how to have and application load and run user defined code at run-time? I am looking into developing a C# library that the users of a Test Executive application (...
0
votes
3answers
70 views

Error Handling Best Practice for External Library

My development environment specifically is .NET and I'm writing a DLL to be compiled and referenced in other .NET programs we'll be writing going forward. My question is: In that DLL, what is the ...
0
votes
2answers
72 views

Long response times vs. concurrency issues on a multithreaded web server

A class with a slow initialization used to process a request leads to long response times. But the actual method used is quite fast. Should the class be static, I guess it would need to process a ...
0
votes
2answers
174 views

Get data from the byte array

I have a byte array and a value defining the type of the data stored in it (string, int, ...). What is the best way to get this data? I have two options in my mind: Call a method which gives the type ...