Category ".net"

C# LINQ single query to complete an incomplete model

I have a list of incomplete product models. Everyone is missing an owner and a price. Can these deficiencies be filled with a single query to context? Without t

Is there a comprehensive C# linter and formatter like eslint for JS/TS?

I'd like to have my C# projects (.NET Core 3.1+) to be linted and formatted on each build both locally and in CI environment. I know that there's new .NET Analy

OpenXML to Excel: CellFormat Problem - Open Excel-Template and insert datatable to existing Excel-Table with formatted columns

I am getting some data as JSON via RESTful web api and transforming it into a datatable. Afterwards I want to open an "Excel template" (*.xlsx) with OpenXML and

Two Identical applications which communicate over a TCP socket connection on the localhost

C#/XAML .NET WPF ... Both applications need to have the ability to connect with each other, and both should have listeners. How would I do this as I know that u

How can I re-write this input/output files so that my input file is a comma delimited file

How can I re-write this input/output files so that my input file is a comma delimited file (input.csv)? Input file (input.csv): Smith,John,87 Doe,Jane,93 Sacram

How to differentiate Outlook folders to return visible folders only?

I pull the Outlook (365, Exchange server) folders like this: Dim otkApp As Outlook.Application = New Outlook.Application Dim otkNameSpace As Outlook.NameSpace

Issue with JWT token multiple simultaneously refresh with Refresh token

Tools: .NET 6 with EF Core, Vue 3 with Axios. R-Token is Refresh Token. DB is database. I have simple implementation of JWT + Refresh Token auth. Client send Lo

Getting the ID of an inserted record instead of a "TTCError" from Oracle using .Net

We are updating an older application to use the "new" Oracle.ManagedDataAccess instead of the locally installed Oracle Client. But since then a simple statement

HttpClient Modifies BaseAddress in Some Cases [duplicate]

On a basic level, I should be able to set an absolute BaseAddress on HttpClient and then send Http requests with a relative Uri. The expectati

ASP.NET show dynamic changes on all clients

I'm a beginner with ASP.NET and webapplications in general. For a project I have to interact with an enginnering software to read some data, for this I have to

.NET Core Worker service host as a Windows Services (using Coravel for task scheduling)

I have created a worker service to schedule a task using Coravel is a .NET Standard library and it is working as expected. I want to host the same as a windows

Error "dotnet : Could not find any project in `C:\**." when running "dotnet add package Microsoft.AspNetCore.Authentication.MicrosoftAccount"

I have visual studio 2019 and i created a new asp.net core 2.2 project. now i am following these steps Configure Microsoft Account Authentication to enable exte

How do I configure Cosmos DB .NET 3.0 SDK to serialize with camel case?

My .NET POCOs are in ProperCase. My json is in camelCase. How can I configure version 3.0 of the .NET SDK to convert when serializing/deserializing to/from Cosm

I got this error "Unable to resolve service for type AspNetCore.Identity.SignInManager" when I use ApplicationUser instead IdentityUser

I have a .NET Core 3.1 Web Api and I created an ApplicationUser class that inherits from IdentityUser because I need to register some others properties. But whe

Dynamically resize TabControl and Form width to the number of TabPages

I have a windows form with a TabControl and a ListView. When I run the application, I want the Width of the TabControl to increase/decrease to show all the TabP

Handling property change several layers down

I am new to events and handling them, and this is a simplified example of the structure I have: Public Class Main Public world As World Public totalWorl

Deserialize json with dynamic objects that starts with pattern

I'm trying to deserialize some json that looks like this { "id":"2021", "descriptions_bg":[ "30231300", "30233160", "32420000", "3

How to support for Windows 11 "Snap Layout" to the custom maximize/restore button in WPF?

I have a WPF app using a custom Maximize/Restore button. In Windows 11, mouse hover on maximize/restore button does not pop up snap layout feature like below:

Multiple values single data trigger WPF

I have the following piece of code. <Button.Style> <Style BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKe

DotNet command for building and generating zip file on mac machine

Can anyone help me with the .net command for building and generating zip file. I am trying to run below command on mac machine. dotnet build ManageWebAppSourceC