Category ".net-core"

Insert data in a table from another model In .NET Core MVC

I'm trying to build a quiz application and i want to insert the user's answers after the quiz is submitted. this is my question model: public class Question {

Outlook Calendar .Net Core Web API GetList (tokenCredential parameter cannot be null. (Parameter 'tokenCredential'))

I have an API project related to Outlook calendar integration. With this project, you can access your outlook account. I want to list all the events in the cale

Dynamically generate lambda expression

I have the following class: public class Movie { public int MovieId { get; set; } public string Title { get; set; } } I want to create a lambda express

Kafaka Subscriber not receiving the messages

I am writing sample applications in .Net core to interact with Kafka. I have downloaded Kafka and Zookeeper official docker images to my machine. I am using Con

Addig User And Role to my UserRole table - Never used column name is missing

I am trying to add Role to my User and store the UserID and the RoleID in the UsersRoles table. var userRole = await _roleManager.FindByNameAsyn

Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware: Error: 'MS-ASPNETCORE-TOKEN' does not match the expected pairing token, request rejected

I am receiving this error, Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware: Error: 'MS-ASPNETCORE-TOKEN' does not match the expected pairing token, req

Use .Net framework 4.7.2 in .net 6 application

I am trying to find out if it is possible to use a .Net Framework 4.7.2 assembly in another .Net 6 libraries or .Net 6 application. I tried this with some sampl

dotNet Core 5 API Service adds objects to list but result has multiple copies of the last item

dotNet Core 5 C# Web API project, Service class adds objects (based on a viewmodel) to a list. Debugging shows all data correct as the object is built and adde

In XML documenttion, how do I reference another class that has the same name in the same namespace?

I have several C# packages that are closely related to each other. Each one of these has its own IServiceCollectionsExtensions static class living in the Micros

Minimal API Registering Dependencies

I am trying to register dependencies but one thing that is strange is when using specific handlers. For example, take a simple scenario like: using Microsoft.As

What is the difference between homebrew casks 'dotnet' and 'dotnet-sdk' and formula 'dotnet'

Running brew search dotnet shows the following ❯ brew search dotnet ==> Formulae dotnet

Mapster context is null in nested mappings

How I can use MapContext.Current in nested mappings? For example: public class Foo { public string Name { get; set; } } public class Bar { public strin

Why does Event Grid serialize my already serialized data?

I am trying to get into dotnet and Azure and so I build small solution that triggers a azure function by http with a count that then requests the given amount o

dotnet watch run -c $(Configuration) with hot reload

I want to launch my Blazor app with specific configuration and have hot-reload enabled. When I launch with: dotnet watch Hot reload is enabled and everything i

EF6 Entity framework sometimes slow query on SQL Server

We have started a new project in .NET Core. We are just starting out and we are hitting a Web API endpoint to get some reference data of 8 records. We noticed

Powershell running .NET Core on Linux RedHat giving SSL error connecting

I am currently trying to use dotnetcore to run a script over Powershell. This script uses a library that will authenticate with Azure using a service principal

Deserialize json properties when property name matches only partially JsonPropertyNameAttribute.Name value

I am looking for a mechanism in the System.Text.Json package, where I would be able to deserialize JSON on partially matching property names. Unfortunately, the

Where to place the resource root id in the url?

I have resources linked like this: A->B->C->D I want to design a REST API to retrieve the D elements inside of A Which is the best design approach? api

Handled exception causes an AccessViolationException

I would like to ask for help with a C# API Project, to be more specific, an exception that have been giving issues for some pretty long time now. Currently the

WinForms Form is never garbage collected due to reference from ServiceScope

I have a WinForms Form(s) that is not always garbage collected. The form loads quite a bit of data and when it is not garbage collected, it can cause a signific