340,467 questions
-5
votes
0
answers
92
views
WPF Why Use MVVM? [closed]
Why does WPF adopt the MVVM pattern, and why must the view model be designed so that it does not know about the view?
<Button Content="Transaction"
Margin="10"
...
0
votes
1
answer
55
views
Images aren't uploaded in my table despite them seemingly being added in the view. Keeps showing the default image in view [closed]
@using (Html.BeginForm("SpremiPodatke", "Zaposleni", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<div>
<span>Slika</span>
@...
Best practices
1
vote
4
replies
60
views
How to assert the number of SQL queries EF Core executes in integration tests?
I want to write integration tests that verify my ASP.NET Core endpoints don't produce N+1 queries. Specifically, I want a test to fail if an endpoint that should execute 1 query suddenly starts ...
2
votes
1
answer
61
views
MongoDB.NET Driver failing to create nested documents 3 levels deep
I've been unable to create MongoDB documents nested to a third level, using the .NET driver for MongoDB. The top-level class has a list of the second-level objects. The second-level class has a list ...
Best practices
0
votes
1
replies
29
views
how to use wpf datagrid in c# with autocomplete datagrid inside a cell
c# wpf .net 4.8 datagrid with 5 columns and firstcolumn should have autocomplete datagrid with text typing filter and base on the 1 column data selection 2 and 3 rd column data need to be filled and ...
Best practices
1
vote
1
replies
783
views
Best way to handle Package 'x' x.x.x has a known high severity vulnerability
I have a project which has a dependency on a package (call it packageA) that package has a dependency on a different package (call it packageB) which has a known severity vulnerability. So I have a ...
Best practices
0
votes
0
replies
30
views
How to use MiniProfiler EF Core not in ASP.NET Core context?
The official docs say to install MiniProfiler.EntityFrameworkCore and then
public void ConfigureServices(IServiceCollection services)
{
services.AddMiniProfiler()
.AddEntityFramework()...
1
vote
1
answer
56
views
How to identify the installation path and dependencies of DAB Installations for deployment control
Since the Data API Builder (DAB) is installed as a .NET global tool in the setup process, how can one reliably identify its install path, underlying binaries, and dependencies for debugging or ...
4
votes
1
answer
109
views
`Common Language Runtime detected an invalid program` error generating simple dynamic method
I'm working on a JIT compiler for MIPS machine emulation to translate MIPS to CLI. I'm working on getting a nearly hard-coded Shift method, but whenever I try to execute the operation instruction on a ...
0
votes
2
answers
73
views
Cannot add NuGet Source in Dockerfile
I am currently in the progress of setting up a TeamCity Server using docker.
My current issue is, that my builds require NuGet Packages that are produced by other builds of the same server. For this I ...
Advice
0
votes
13
replies
72
views
IServiceScopeFactory vs IServiceProvider injecting into a singleton to call the CreateScope method
I have two options for accessing CreateScope, and I'm wondering which one is better for a singleton. Is there any difference, considering that IServiceProvider.CreateScope is an extension method that ...
1
vote
0
answers
93
views
Error creating window handle in unit tests [closed]
I have some unit tests that are testing a .NET 4.8 Windows Forms application.
Some of these tests construct an instance of a form and perform tests on various logic. The constructor calls ...
0
votes
0
answers
54
views
What, exactly, does RaisePropertyChanged() do?
What does this.RaisePropertyChanged(nameof(MyPublicProperty)) actually do?
I'm working in C#/.NET/Avalonia 11/ReactiveUI.
I've been fighting with a case where I've got a status bar with a bunch of ...
-4
votes
0
answers
87
views
How to send rendered HTML page using Gmail? [closed]
I have an HTML file which has some style. If loaded in browser, e.g. Edge, it looks OK.
Now I want to send the rendered HTML as an email using Gmail. What I will do is:
Copy the rendered page from ...
0
votes
1
answer
52
views
MemoryMappedFiles access pattern
I have read
.NET Memory-mapped files
The 1993 Win32 Managing Memory-Mapped Files
I can't find a clear answer to the following. My scenario is that I have thousands of files of 25 MB each. I need to ...