Category "c++sharp"

How skip some migrations in ef core?

I had some changes in my ef context and I added new Migraions dotnet ef migrations add changed98112601 then I run the below command dotnet ef database upd

Callback or event/delegate from C# core rest api BackgroundService

I´m currently working on a C# core 5.0 REST API with a RabbitMQ messagebus. I´ve created a class that derives from BackgroundService and the consume

ASP.NET Core api controller not being instantiated

I've created an API controller in my .NET Core 3.1 application (with an Angular frontend, C#). For some strange reason its not being instantiated, if I try to c

Trying to setup HttpListener causes an exception, any ideas?

I'm trying to set up a HttpListener for a Server Manager for my Multiplayer Unity Game but I am getting an exception when executing the following code: using Sy

How do I access all XAML elements with a given tag in C# WPF?

In my XAML, I have various error messages in the following structure: <Border CornerRadius="3" Background="#FFF3C7C7" Margin="6" Visibility="Collapsed" N

Show an image stream to client in blazor server without javascript?

Right now i have the following lines of code: private async Task SetImageUsingStreamingAsync() { var imageStream = await GetImageStreamAsync(); var dotn

.NET Core 3.1 CreateHostBuilder Cannot parse JSON file

I am experiencing an error when trying to run my ASP.Net Core 3.1 project. The error is at CreateHostBuilder within Program.cs public class Program {

Dynamic container name when mapping Cosmos DB using EF Core

I have an OData endpoint which query collection of Cosmos entity. The Cosmos DB container name is dynamic so that I cannot use entity.ToContainer("<container

How to move a ListViewItem part of a Group in place of another ListViewItem using the same ListView?

Below I'm trying to move item4 in place of item5, the action I expected was for item 4 to be on top of item5 and item5 under item4: Below I'm trying to move it

Non-nullable property must contain a non-null value when exiting constructor. Consider declaring the property as nullable

I have a simple class like this. public class Greeting { public string From { get; set; } public string To { get; set; } public string Message { ge

Non-nullable property must contain a non-null value when exiting constructor. Consider declaring the property as nullable

I have a simple class like this. public class Greeting { public string From { get; set; } public string To { get; set; } public string Message { ge

How to seed in Entity Framework Core 3.0?

I am trying seed the database with some data, using ASP.NET CORE 3.0 and EF Core. I've created my DbContext and according to documentation, online sources, or

Error 'Invalid hostname for this tenancy' on using graph api of sharepoint to subscribe event notification

I am new to sharepoint and now I am trying to create a webhook for my sharepoint sites, such that on any crud operation i would get notification in my app I ha

Creating dropdowns according to the database

There are different properties for 3 (x,y,z) properties in my database. I created a dropdown and according to the selection I will make in the dropdown, I want

How to work with gas days in a C# project?

A gas day is defined as a time range of 24 hours which starts at 5:00 UTC and ends at 5:00 UTC of the following day during the European standard time. During th

How to refresh web page after database update in ASP.NET CORE with Blazor

I'm making a small room booking web app and I would like to have the web page refresh on a given interval; ie a given minute or when a change has been done to t

save data and open in another class

I've got a litlle problem: How do I get stored data from one model into another? I've got an app which is loading strings from a textbox and I want to save them

WPF Canvas: Rotate a grouped shape

In my WPF application, I am trying to rotate a set of grouped shapes inside a canvas. I am getting grouped shape object TOP/LEFT position using the formulae men

How to improve unity management on android? unity2D

please tell me how to make the player control was not tied to the finger, but for example to drive in any part of the screen and the player will move from the p

Xamarin: How to delete files using CrossFilePicker Xamarin Forms

I am using the following code to pick a file using CrossFilePicker in Xamarin forms. Goal is to delete the selected file in Xamarin.Android project, file still