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

Filter by
Sorted by
Tagged with
0 votes
1 answer
353 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://...
k29's user avatar
  • 109
1 vote
0 answers
304 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 ...
user avatar
2 votes
2 answers
335 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 ...
user avatar
2 votes
1 answer
207 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 ...
Adrian's user avatar
  • 175
1 vote
2 answers
315 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 ...
Uwe Keim's user avatar
  • 347
1 vote
1 answer
126 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 ...
eparham7861's user avatar
21 votes
5 answers
10k 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 ...
ChristianH's user avatar
0 votes
1 answer
144 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. ...
Troy Frazier's user avatar
2 votes
1 answer
1k 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 ...
Andrew Shepherd's user avatar
1 vote
2 answers
777 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 ...
Adam Wojnar's user avatar
1 vote
1 answer
4k 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 ...
TontonVelu's user avatar
1 vote
0 answers
60 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. ...
Chihuahua Enthusiast's user avatar
5 votes
2 answers
2k views

Should a solution containing projects exposed as nuget reference them as package?

Scaling down for the sake of the example, my project is structured like this: solution X project A project B Project A is exposed as nuget packages externally, project B need ...
Giulio Caccin's user avatar
1 vote
1 answer
1k views

Unit test compiled dll or shared code

I have code in a (Visual Studio) Shared Project, and a number of end solutions/projects which compile and build the Shared Project to various environments (repo). When writing unit tests, I will want ...
Zev Spitz's user avatar
  • 693
8 votes
5 answers
853 views

How to avoid many objects in constructors when many steps are performed by a class

I have a process which must do 8 steps, in a particular order. One of the step involves sending an email, another one going on a distant FTP server, another one querying a database, and so on. Now to ...
user1861857's user avatar
1 vote
5 answers
2k views

What is best way to handling exceptions without users see errors for technical supports?

Assuming you have a software which you gave to clients. Now we all know that exceptions can be saved to files, databases, and so on for tracing errors by technicians. As all engineers know, no Apps ...
CowBoy's user avatar
  • 153
1 vote
1 answer
119 views

Should i create a Core library for all business applications ? or each one individual?

I was find many companies which creating entities and models for each business applications So all these apps not reusable. Now, some clients of the company for example. needs 3 kind of software. ...
CowBoy's user avatar
  • 153
1 vote
1 answer
203 views

Question on MVP Pattern, Events and saving complex objects

I'm working on a winforms project that involves 3d models, Opengl graphics, hierarchical project files and uses an MVP approach. Currently i have things setup such that when the user manipulates ...
PeteByte's user avatar
0 votes
0 answers
317 views

Design Decision - MassTransit or NetMQ

We work in a traveling company. We sell tickets for domestic flights, international flights, trains, and buses. Currently, each of these products has its own team members and they use different ...
Moien Tajik's user avatar
-1 votes
1 answer
103 views

How to design a repository when datasource differs based on DML/READ operations?

We are starting our new application in which we using MS SQL DB for all our insert/update/delete/select ie. both SELECT and DML operations. But, soon we will have two different sources. SQL Server ...
SamuraiJack's user avatar
0 votes
2 answers
1k views

What is the Difference between Reactive Extensions and Message Queue?

I am trying to understand the difference between Reactive Extensions and Message Queue? Are they competing frameworks? Can they be used in conjuction? Started programming, and trying to understand ...
DerrikRodgers's user avatar
32 votes
7 answers
12k views

How to treat unhandled exceptions? (Terminate the application vs. Keep it alive)

What is best practice when a unhandled exceptions occurs in a desktop application? I was thinking about to show a message to the user, so that he can contact support. I would recommend to the user to ...
Jonas Benz's user avatar
2 votes
2 answers
1k views

Throw Custom Exception

First, I know - there are a lot of online resources that talk about the topic Exception handling - but yet there is still something that's unclear to me. Consider having this code in an external ...
devsmn's user avatar
  • 129
-1 votes
3 answers
90 views

Is it wise to locally debugging a solution with a framework version that differs from production's?

A small, neglected project has recently been reported by users as having time out errors and some object reference exceptions. As I am a recent replacement for a developer who was responsible for this ...
8protons's user avatar
  • 1,369
7 votes
2 answers
967 views

Daylight savings time for real time application

I am building an application on windows forms C# that will run in real time 24 hours a day 365 days a year. This application tracks the time that components are out of storage. I am running into a ...
Stephen Carey's user avatar
3 votes
1 answer
452 views

Isn't asynchronicity an implementation detail?

Consider a simple — and fake — interface: interface ISuperGetter { Super Get(); } An implementation would get some Super from RAM. One would store what it needs on disk. Yet another could fetch the ...
user avatar
0 votes
2 answers
9k views

What is Difference between DTO and Response Object?

What is the difference between a Response Object and DTO in software architecture? Say I want to get a list of Products in a catalog. If ProductDTO is this, how is a Product Response class different? ...
DerrikRodgers's user avatar
1 vote
2 answers
1k views

c# Is using the assertion method bad or not for clean code?

I'm reading Uncle Bob Martin's Clean Code and now I have a question about the code I wrote. Is using a method as an assertion method a good or bad practice for clean code? Example // Simple example ...
pampua84's user avatar
  • 133
3 votes
0 answers
176 views

Designing ABAC-style Authorization module with Row-level security

I'm designing the Authorization part of the AAA module of a business software suite. Requirements: There are Users and Groups, and you can assign Permissions to any of those. You can Grant or ...
KalaNag's user avatar
  • 67
18 votes
3 answers
2k views

Should wrappers compare as equal using the == operator when they wrap the same object?

I'm writing a wrapper for XML elements that allows a developer to easily parse attributes from the XML. The wrapper has no state other than the object being wrapped. I am considering the following ...
John Wu's user avatar
  • 26.6k
0 votes
1 answer
2k views

Should Specification Patterns return IEnumerable, IQueryable, or Expression?

We are implementing Specification Patterns with Domain Driven Design. Company architect also wants us to utilize Generic repository (not my choice). Currently require specification Pattern for Filter ...
Matt Smith's user avatar
2 votes
1 answer
3k views

Which Software Layer should hold Pagination Information?

Which layer should hold pagination information? (Page Size, Page Number), Eg say 100 products, 5 product per 20 pages. User can type in API url layer. api/Product?Page=1&Limit=2&ColumnSort=...
Matt Smith's user avatar
1 vote
1 answer
120 views

How to properly handle deployment configuration for Xamarin Forms app

We are currently working on a Xamarin Forms (.NET Core) application. We use Microsofts DevOps for the code repo, building and deployment. Since we want to test newly developed features in a safe ...
Manuel Merzinger's user avatar
0 votes
1 answer
2k views

Domain Driven Design: Is OrderLine Detail a Nested Class of Order Header?

I had asked a question here, and someone had recommended that OrderLine be a Nested class within Order Header. Is that a standard practice in Domain Driven Design, or more one of many debated methods ...
Matt Smith's user avatar
1 vote
2 answers
342 views

Downloading and appending data from AWS S3 whilst avoiding clashes

I have to upload a TSV file to an S3 bucket, the content is form submission data. Another service will consume and do things with this data as soon as possible. The service would like one large file ...
monkeySeeMonkeyDo's user avatar
0 votes
0 answers
167 views

Need some design advice on my ORM for Immutable objects & ref passing

I'm adding Immutable objects support to my Micro ORM called "Symbiotic" In the case of a create, I need to pass back a newly created version of the value passed in because the object is immutable and ...
Eric Schneider's user avatar
2 votes
2 answers
1k views

Micro-services architecture for Data Ingestion/Transformation pipeline project

I am working on designing a brand new Data Ingestion Pipeline with the Key highlights of the new project are as follows: Download and Update data to/from SharePoint using SharePoint APIs Download and ...
Nanu's user avatar
  • 121
0 votes
1 answer
57 views

When to use type contraints for sortable collections

I am implementing a Binary Search Tree and cannot decide if it would be good practice to constrain the generic type of the tree to a comparable item, i.e. IComparable<T>. Or, to just use the ...
Connor Blakey's user avatar
-1 votes
2 answers
2k views

How to initialize base class property once instead of passing it from all derived classes?

I have a small library where I am performing 1 long running operation and based on that operation,I am saving some data inside database tables.Now this is small library which does not include alot of ...
I Love Stackoverflow's user avatar
-1 votes
2 answers
202 views

SRP violation confusion based on examples

I am trying to gain better understanding on SRP and when I was checking out a Pluralsight video by Scott Allen, I saw code like this: https://github.com/OdeToCode/cs-fundamentals/blob/master/src/...
I Love Stackoverflow's user avatar
0 votes
1 answer
85 views

Should we still create separate custom ApplicationExceptions?

Given that when is supported in try...catch blocks, does it make sense to create a single CustomApplicationException class, say, with an enum ApplicationExceptionReason Reason property to ...
Anthony Mastrean's user avatar
2 votes
4 answers
1k views

Why does C# not have automatic dispatchers

Why does C# make you put in a dispatcher for a different thread to update the UI? Example: Dispatcher.Invoke(() = { lblerrorName.Content = ""; }); It always gives the 'running on different ...
NoOne's user avatar
  • 81
0 votes
2 answers
2k views

Passing runtime-read configuration when working with an IoC container

I've recently "discovered" the IoC realm, and decided to refactor a project I'm working on to use such a container. To be specific - I'm using autofac in C#, in a .NET Core console application. The ...
Timor Gruber's user avatar
0 votes
0 answers
185 views

Tradeoffs between Testability and Performance when filtering using SQL vs LINQ

My team has recently decided to adopt the CQRS pattern similar to the one used in the famous Microsoft EShopsOnContainers repository. In this solution, the queries are made in Query classes using ...
Josh L's user avatar
  • 103
2 votes
1 answer
178 views

Way to hide logic behind class for better readability of method and refactor class to follow SRP

I have an algorithm to create a version for an entity and then I save that version against below 2 entity: 1) Variant 2) Category interface IEntityVersion { string GetVersion(); } public class ...
I Love Stackoverflow's user avatar
2 votes
1 answer
884 views

NuGet versioning with gitflow

Some background information to our actual situation. We are migrating from TFS VC to git. We've a ASP .NET Web API with many different Controller Libraries (>30 assemblies). Many of them are ...
carstinho's user avatar
2 votes
1 answer
519 views

Must we define methods and async when we don't know whether the implementation is synchronous or asynchronous?

I think I know the answer to this, but it's particular enough that I don't want to go telling other people stuff until I'm 100% certain. Suppose I have a class with some dependency: public interface ...
Scott Hannen's user avatar
  • 1,034
0 votes
2 answers
114 views

Appropriate pattern for injector that sets a property and client that ONLY gets a property

Suppose I have a method in client code that expects an interface... void DoWork(IDataManager data) { //use IDataManager interface in the DoWork method } And the IDataManager interface looks like ...
Doug Tait's user avatar
4 votes
1 answer
957 views

DDD / Onion architecture in JavaScript

One reason I like .NET is because the 'solutions' and 'projects' lends themselves to good architecture. Good architecture makes it easy to follow the happy path of Domain-Driven Design. I've fallen ...
RJB's user avatar
  • 2,110
1 vote
1 answer
852 views

Data entities in Onion Architecture

I'm trying to build a project using onion architecture (just a "Northwind"ish type app to get more up to speed with .NET Core). I also want to get a better grasp on Onion Architecture principals. I ...
Adam Plocher's user avatar

1 2 3
4
5
30