Category "c++sharp"

Is there a more Functional way to aggregate a collection into set of Mongo Filters conjugated by OR?

We have a microservice which enables consumers (indirectly) to query a database, where we have our own logic to limit what consumers can do with the queries. Wh

Http post .csv file Angular 2 and then reading it on the server .NET

I'm trying to send .csv file from my client app (angular 2) to my web api (ASP.NET), and I have done the following: Tried to make FormData from my .csv file t

Hangfire Not Getting Configurations when I try to run Test Case for the method containing hangfire activation .net Core REST Web API

public async Task<IActionResult> SendOrders() { try { RecurringJob.AddOrUpdate("powerfuljob", () => _lab.SendOrders("

How to pass arguments in command line using dotnet?

the command dotnet myapp.dll -- [4, 3, 2] throws the exception System.FormatException: Input string was not in a correct format. I do not know the syntax. How s

.NET Newtonsoft Allow property to be only serialised

I have implemented the answer from this (rather old) question https://stackoverflow.com/a/31732029/4180176 but it doesn't seem to work for me and I can't figure

Storing DateTimeOffset value without milliseconds in SQL Server using EF Core

Say I create a DateTimeOffset value like this: var dt = DateTimeOffset.UtcNow; And I want to store this value in SQL Server using EF Core code-first. How do I

net::ERR_CERT_AUTHORITY_INVALID in ASP.NET Core

I am getting the net::ERR_CERT_AUTHORITY_INVALID error in ASP.NET Core when I try to request my Web API from an SPA. The first solution to fix the issue was to

What is default maximum request length in .net core

I want to know what is default maximum request length in a .net core application. I read from few links that the default limit is 4 MB for asp.net applications

How to use Serilog.Log.ForContext with F# function or C# Method

Using Serilog and F# how to use .ForContext with functions? it appears it only accepts type classes: type A()= log = Serilog.Log.ForContext<A>() // c

C# Razor partial view using an iFrame returns dictionary error "`1" and "`2"

I am attempting to load a partial view into an iFrame and receiving the below error. When loading the same partial not inside of a iFrame, there is no issue. Lo

WPF - Problem showing a symbol from a custom font

I have a custom font. The font contains symbols at specific addresses. I want to display one of the symbols in a TextBlock. The font (ttf-file) is located in my

Intercept saving of entities in Entity Framework Core

Is there a way for EF Core to intercept the pre insertion, pre update, pre delete, post insert, post update and post delete events of an entity? EF core support

Data changes during fetch on a service on IIS

I am facing quite an interesting error. I have services hosted on IIS, on a server which is an application server. I have two services in focus. 1 - One is a pu

Why can't I add months to OffsetDateTime?

I'm using NodaTime to manage dates and time zones in a .Net Core WebApi. One of the type in the library is OffsetDateTime, which is very similar to DateTimeOffs

React + ASP.Net-Core CORS Problems

While CORS is a big issue when working ReactJS in combination with ASP.Net-Core I figured out how to enable CORS so when accessing my UI (http://localhost:3000)

How can I integrate toast notifications in WPF app?

I wanted to add toast notifications to my wpf app. I've followed the Send a local toast notification from desktop C# apps from Microsoft, but I'm stuck on the s

gRPC intercept calls in C#

I'm using gRPC in C# (NETCore). I would like to log each single method call, and I expect to have some way of intercpt each call at once, instead of putting a l

Best Practice winforms async/await keywords

Testing a bit TPL. I use this code and it works: async void button1_Click(object sender, EventArgs e) { MyClass2 mc2 = new MyClass2(); la

Oracle SQL statement returns no rows when executed from C# application

Following SQL statement returns data when executed in Oracle SQL Developer: SELECT TC_GUID FROM TBLBUF WHERE TC_DEST = 'aaaaaaa' AND TC_STATE <= 20 but when

MASM SHA256 running from C#

I received a task in college to compare execution time for calculating SHA256 in C# and assembly. It is supposed to be a simple WPF app with file input and 2 bu