Category "c++sharp"

MessagePack subtype serialization

Serialization/deserialization turns a collection of a base type with child-type items in it into a collection with base type items only. Is there a way to set u

EF LINQ query with Expression: method name expected - How can I pass an Expression into function to be used in EF query?

I have a function that's supposed to return different info from an EF LINQ query based on an Expression and/or lambda that's passed to it. Here's my code: pub

Running .dtsx file via command line programmatically from a winform c#

I am new to programming. I was hoping for some help to correct the below code. I have a WinForms application using an Azure SQL database. overall I am trying to

Tabular Editor: How to use advanced scritpting to create multiple measures based on one value and one category column

I am trying to create multiple measures in Power BI through advanced scripting in Tabular editor that would replicate a Calculate(Sum(ColA),Keepfilters(ColB=i))

How to generate class with file-scoped namespace syntax (C# 10) in vs code?

I would like to generate a new C# Class or C# Interface in Microsoft Visual Studio Code following the newest C#10 file-scoped namespace syntax. https://docs.mic

Why app returns only one supported culture?

I try create language switch on my site. I've add cultures in Startup: IList<CultureInfo> supportedCultures = new List<CultureInfo> { new Cultur

How to receive attachments from users

How do I receive an attachment from a user? I've tried iterating through the Attachment object to extract the content of attachments, but it's always null: fore

CanExecute works only partial

I am working on a WPF .NET 5 application that needs to handle a longer task using a button command. Until the task is done, the button should be disabled. I am

Enabling and Disabling DataGridView button cell

I have made a DataGridView in a Windows Form with the Name serverListand then added a selection of columns then at the end of each row I have added a button cel

ASP .NET Core 6 with Windows authentification - don't show user login prompt dialog

I've created an ASP .NET Core 6 Web App with Windows authentification from a template and I assume that current Windows user's credentials to be obtained autom

How to set up event handling with prebuild class

I am very new to C# and try to use Microsoft.MixedReality.QR for reading some QRCodes with the Hololense 2 and have problems accessing the events of the QRCodeW

Connectionstring: is it the right form?

I'm new to SQL Database C# projects and I have a problem with connecting to my database in a windows form application which is a single user app and I want to u

Fetch results of unknown Kusto query in C#

I am trying to fetch results from an unknown Kusto query. Example: var query = "StormEvents | count | as HowManyRecords; StormEvents | limit 10 | project StartT

Validation in Winform using Data Annotations

I create a validating class like so: public interface IDataErrorInfo { string this[string columnName] { get; } string Error { get; } } public class Bas

Publishing WPF application fails du to unauthorized .NuGet service index (Azure DevOps)

I want to publish one of my WPF applications (to a folder). The app needs some NuGet packages that I published via Azure Devops. I signed in with Visual Studio

Copy bits in correct order

In order to parse a binary stream of unmanaged data, I have to recreate data types. The data is compressed which means I read 2 bytes which actually represent a

HTTP Patch Delta is Null with oData web service

I am using entity framework code first. My entities and controller were generated by Visual Studio and have not been modified. This issue seems to be that the

Importing exported project templates in Visual studio does not restore packages

I created an project template according to microsofts docs. The project itself requires 3 packages that I installed from Nuget. However upon importing the proje

How can I avoid TimeOut exception using Entity Framework with a stored procedure?

I'm using Entity Framework to call a stored procedure which takes 2 minutes to execute. As a result, I get a timeout exception. Is there any way I can use my

Creating a tree from a collection List<T>

In order to create a tree, I use the following code. var db = _context.GetContext(); var accounts = await db .Set<TradingAccount>()