Skip to main content

Questions tagged [c#]

C# is a multiparadigm, managed, garbage-collected object-oriented programming language created by Microsoft in parallel with the .NET platform

4 votes
1 answer
110 views

I'm working on a WPF application which has many user interactions which start with opening a non model window, allowing some interaction with the window and the rest of the application (think ...
LOul's user avatar
  • 41
2 votes
2 answers
303 views

I’m working on a WPF MVVM application that has grown beyond just one or two User Controls. I now have multiple ViewModels that need to react to each other’s actions (e.g., selecting a customer in one ...
Sam's user avatar
  • 29
8 votes
4 answers
2k views

When using Entity Framework and running the Update-Database command, non-updated applications that rely on the database crash due to database context changes. Usually teams have a production database ...
EMN's user avatar
  • 795
4 votes
1 answer
1k views

My job uses SonarQube as part of the CI/CD quality gate. One of the "Maintainability" issues (severity: medium) raised is the CA-1822: Mark members as static. The link explains the added ...
Veverke's user avatar
  • 541
1 vote
3 answers
245 views

I have a C# library that contains all the logic to send requests to a remote endpoint, including marshalling/unmarshalling and encrypting/decrypting requests and responses. It contains an HttpClient ...
hyt's user avatar
  • 121
0 votes
2 answers
150 views

When using recursion in an extension method, there are two different ways to invoke the method from within itself. Option 1: As an extension method internal static class MyExtension { public ...
Josh Brunton's user avatar
16 votes
10 answers
5k views

I have noticed in documentation, looking at open-source code bases, and just a general sense in the industry that C# developers largely prefer to use List<> or IEnumerable<> over simple ...
K0D4's user avatar
  • 423
2 votes
3 answers
171 views

My team does predominantly back-end work in C#, with a smattering of front-end web development using Angular. We're starting a new website project, based on the Admin LTE framework / template. This is ...
mmathis's user avatar
  • 5,586
0 votes
2 answers
346 views

I have a question about setting up my service. My main concern is if the design is clean and in order. Whether it meets the SOLID principles and does not spill out on me. I have entities like order ...
Petr Klekner's user avatar
3 votes
1 answer
164 views

The move to MVC and MVVM has not been easy for me. Combining multiple languages in single pages with inline code is something I find disorienting. I'd like to remedy this by attempting to use Razor ...
Northern Scrub's user avatar
2 votes
1 answer
180 views

Preface: This will not be available publicly or to third parties, so I am not concerned about users having the background knowledge to properly form GET requests. These are also not only analytical ...
user avatar
1 vote
1 answer
321 views

public void ReassignLineItems(InvoiceUpdateDto invoiceUpdate) { Invoice invoiceInRepository = _unitOfWork.InvoiceRepository .FirstOrDefault(invoice => invoice.Id == invoiceUpdate.Id); ...
EMN's user avatar
  • 795
2 votes
1 answer
145 views

My main focus is having as little duplicate code/files as possible. Most of the HTML I write is almost identical. There is already a form template which holds the form and several necessities. That ...
Roe's user avatar
  • 131
1 vote
1 answer
176 views

In an ASP.NET MVC application with views that make AJAX calls for widgets like dropdowns and data grids, is it better to use Web API controllers or regular MVC action methods that return JSON? The ...
EMN's user avatar
  • 795
0 votes
2 answers
239 views

I am new to C#, and Windows (coming from Python, Linux background). I need to add tests to an existing C# codebase, which relies on a MSSQL database and Entity Framework. In my old days when testing ...
mguijarr's user avatar
  • 226

15 30 50 per page
1
2 3 4 5
332