Category "c++sharp"

Error Object Id' is unknown when attempting to save changes. Adding Many to Many to the DB

I have objects with many to many relationship. public class Executor { public long Id { get; set; } public string Name { get; set; } public List&l

ASP.NET Core form ignoring asp-controller

I'm working on an ASP.NET Core application. Part of it is an image gallery which allows the user to upload images. On localhost this works as expected, but when

combobox tostring() returns object instead of value

I want to retrieve the string value selected in a combo box and convert into an integer, however the SelectedItem method always returns the name of the object.

Why is static Configuration.GetSection() not available?

In my ASP.NET Core 3.1 project I am trying to read a configuration option from "appsettings.json" via dependency injection service container just as explained b

This site can’t provide a secure connection asp.net core from dotnet linux

I am currently developing an API using asp.net core 2.1. When I use the ide visual studio 2019 in windows I don't have problems running the project, but now I

The Enter Key does not close a Form if the Focus is on a Button that is not the AcceptButton

I have a modal Form with three Buttons, A B and C. In addition, I have two Buttons: OK and Cancel. The OK Button's DialogResult property is set to DialogResult.

Does exposing some methods of a class through an Interface break any SOLID design principle? [closed]

I understand interface segregation and single responsibility principles guide against a class implementing methods or property it doesn't need

WPF goes to the top of each pages when navigating/reloading page

I'm very new to WPF .net 5.0 framework. Every time I navigate to a different page in a frame, it maintains the scroll position instead of going back to the top

Deserialize json with dynamic objects that starts with pattern

I'm trying to deserialize some json that looks like this { "id":"2021", "descriptions_bg":[ "30231300", "30233160", "32420000", "3

How to support for Windows 11 "Snap Layout" to the custom maximize/restore button in WPF?

I have a WPF app using a custom Maximize/Restore button. In Windows 11, mouse hover on maximize/restore button does not pop up snap layout feature like below:

Multiple values single data trigger WPF

I have the following piece of code. <Button.Style> <Style BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKe

DotNet command for building and generating zip file on mac machine

Can anyone help me with the .net command for building and generating zip file. I am trying to run below command on mac machine. dotnet build ManageWebAppSourceC

C# Selenium - Can't access image url in another tag

I'm trying to validate image on website however can't access the url of the image. Most websites will have the image with a "src" tag however this website has t

git checkout slns between old and new csproj formats

We recently ran the csproj migration tool on our solution with 156 projects: dotnet tool install --global Project2015To2017.Migrate2019.Tool This worked very w

Net core Identity lockout not lockout user account

I try to enable lockout feature but I am not successed. Each time, I check database, AccessFailedCount is increase to 1 but after that again it turn to 0. What'

Using the Try-Convert Tool for migrating from .net to .net core Multiple installs of MSBuild

I have installed the Try-Convert tool, and when i go to the root of my project and execute the try-convert command - I get multiple installs of MSBuild detected

How to save treeview xml correctly when I edit it in winfroms?

Let's say. If I have this kind of xml file. <Main> <group name="R1"> <IsUser>Example</IsUser> <IsUser>Example2</IsUse

Sockets in Unity

I'm working on a project that requires me to connect to an outside server from my oculus app, I want to do this via pushing a button. I have pretty limited C# k

Helix Toolkit in c# displaying ply point cloud

I have made a ply file with the help of this wrapper. How I made the ply file is shown below: using (var frames = pipeline.WaitForFrames()) { var colorFrame

Servicestack.Redis how to use GetRange feature

I need to use the redis command GETRANGE. I use it this retrieve the hash I store along with the string content, to evaluate if this latter has been changed whi