Category "c++sharp"

Could not determine JSON object type for type "Class"

I got the following error while trying to add an object of type class to the JArray. Could not determine JSON object type for type "Class" Here is my code: pr

how to disable button during ajax request

so I have a razor form and I want to disable a button during ajax request. Also I want to be able to send only one request to controller - (disable any flood a

How to use multiple conditions in single DASL filter query in C#? (Syntax) (for advancedSearch() method)

screenshot 1: screenshot 2: BACKGROUND: Currently I am searching for a word in the subject of email in VSTO add-in. My syntax is: string filter = "urn:sc

.NET Core 6/EF Core 6.referencing Microsoft.Data.SqlClient, Version=2.0.20168.4

We've created a Web API using .NET Core 6 and EF Core 6. In development environment all works good but when I do the publish application fails with an error Sy

How to update C# version in Visual Studio Code?

I have installed C# extensions, my .NET framework is updated, I just can't fix it.

CompilationFailedException during runtime compilation of Razor from AspNetCore TestHost

I have ASP.Net MVC application, one part of it is compiling razor views to string. The code is very similar to this example: https://long2know.com/2017/08/rend

Use C# for Catia V5 Automation

I want to write Macros/Programs for Catia V5 with the programming language C#. How is it possible to access the Catia applicataion via c#(and Visual Studio). I

How do I use IConnectionPoint to capture the "Forward As Attachment" event?

In this article, How to detect Outlook Events ..., Dmitry Streblechenko outlines how to subscribe to Outlook Events not listed in the TypeLibrary. Would these

the type or namespace name 'RuntimeCompilation' does not exist in the namespace 'Microsoft.AspNetCore.Mvc.Razor'

If I write this line of code, services.AddMvc().AddRazorRuntimeCompilation(), in startup.cs and while publishing the project from Visual Studio 2019 on Azure, I

Multiple using of || and && operands

I have a query using Entity Framework. It has many different operands and I am confused with its priority. I am getting the wrong result. I need all records tha

How to load razor page before it's done rendering?

I have a table of records in Index.cshtml, once a user clicks on a record to view the details it will take them to Details.cshtml. The issue is, there is a lot

Showing #value! before enable editing on excel if I write formula using epplus

Using C# .net core I am updating existing excel template with Data and formulas using EPPlus lib 4.5.3.3. If you see the below screen shots all formula cells ha

Inconsistent Accessibility in Lists c#

I'm following an RPG c# tutorial, and have come across this error. It is not explained in the tutorial, and I'm unsure what i did wrong. Here is the class: usin

Pass current transaction to DbCommand

I'm working on a project using ASP.NET Core 2.1 and EF Core 2.1. Although most of queries and commands use EF, some units needs to call stored procedures direct

Microsoft.AspNetCore.OData 8: controller is not found by convention

As described in the docs, Microsoft.AspNetCore.OData 8 uses a convention to tie a controller to an entity set. They also provide a sample that demonstrates this

A second operation started on this context before a previous asynchronous operation completed

Message: "System.NotSupportedException was unhandled Message: An unhandled exception of type 'System.NotSupportedException' occurred in mscorlib.dll Additional

Is there a way to skip MediatR Pipeline?

I would like to cache some responses from CommandsHandlers. I Already did this using IPipelineBehaviour, but only 5% of my requests really must have cache, and

Convert image byte array to PDF

I'm looking to convert an Image (PNG, JPEG, GIF), in the form of a byte[] to a PDF. I'm currently using this function, which works, but cuts off the bottom of i

DotNetCore 1.0 MVC how to automatically redirect to a single domain in live

I have multiple domains for a website: http://example.com http://www.example.com http://www.example.co.uk In production, I want the primary domain to be htt

Converting C# into Powershell with DllImport involved

I've recently been working on a little side project to see if I can get a little memory editing to work with PowerShell. I put together a small script in C# tha