Category "c++sharp"

return in if statement throws conversion error

I will apologize in advance for the long post. Just trying to give you all the information I have. I have an if statement in a method that looks like this: var

Using eShopOnContainers .NET microservices architecture - Use AD B2C instead of IdentityServer4 for microservice authentication

I have downloaded eShopOnContainers that is a .NET Microservices Sample Reference Application for microservices architecture and Docker containers. https://gith

The entity type 'Access' requires a primary key to be defined. If you intended to use a keyless entity type call 'HasNoKey()'

i have this ValueObject : public class Access : ValueObject<Access> { public string ControllName { get; set; } public string ActionName { get;

Outlook doesn't show date on the preview when eml is converted to msg using msgkit

i tried converting the .eml to .msg in c# using msgkit so my .eml file looks like this Date: Thu, 30 Jan 2020 12:09:26 +0530 its a simple .eml file i tried c

Azure Web App Service has Steady CPU Time Increase

I have what is essentially a flashcard web app, hosted on the free version of Azure and coded in ASP.NET (C#). It is used by a small amount of people (40 or so)

How to check if a property is $select-ed?

I am building an OData web API, and I am trying to implement this function to determine whether a given property should be included in a GET response based on t

C# Couldn't process file xxx.resx due to its being in the Internet or Restricted zone or having the mark of the web on the file

I have an issue while I try to build project in VS2012. It cannot build due to the error: Couldn't process file xxx.resx due to its being in the Internet or Res

Should I take ILogger, ILogger<T>, ILoggerFactory or ILoggerProvider for a library?

This may be somewhat related to Pass ILogger or ILoggerFactory to constructors in AspNet Core?, however this is specifically about Library Design, not about how

Can c#/Razor work with DyGraph WITHOUT Javascript?

In this question: Previous DyGraph question There is still the need to go to JavaScript to call DyGraph: <script type="text/javascript"> g = new Dygraph

How to check an empty object?

I have a number of objects. Some of them have string properties and some of them have bool properties. I'm using them in multi-step form. so each step is bound

OmniSharp failure: Can't create task 'GetReferenceNearestTargetFrameworkTask'

I'm using VSCode with C# extension (checked version - it's latest - 1.23.11) and quite happy with it. However, today it suddenly stopped working (no Intellisens

Why won't EF Core update this item on my database?

I'm having trouble updating an item on my database. I've tried several different ways, but nothing seems to work. Here is my latest attempt: public async Task

System.Text.Json.JsonSerializer.Serialize adds \u0022

How can I set JsonSerializer to not add "\u0022" to string for EventData property? Because I get: {"Id":5,"CreateDate":"2021-04-21T05:26:30.9817284Z","EventDat

Draw a Line on Canvas With Mouse Position Unity 3D

I followed a tutorial to draw a line using mouse position, the line will be drawn inside the canvas. But when running it, the line didn't drawn! and it gives me

How Can I add keys in Registry Editor whe the app is installed?

I need to add a key cause I need that my application starts at the same time as windows, this is what've done so far. [RunInstaller(true)] public partial class

How do I save outlook Mailitem as sent mail

I have created an Outlook mail item and want to save it in a folder as a sent mail. I was able to set sender mail using mail.SentOnBehalfofName. How do I add Da

How to loop though and change background color of each item in a list [closed]

I'm trying to change the Console.BackgroundColor for each item in a list, and am wondering how I would go about doing so. public static List&l

message shows undefined when ajax post in ASP.net

Hi I'm Fairly new at coding and in asp.net and had an error occurred to me please help me if you can. This is my script when I run the code given below using an

Pie Chart is not viewing in the HTML reports after converting from .trx with tool TRXER

I have converted the .trx file to HTML reports but pie chart is not showing on html reports. I have Chrome 79+ version. I created html reports after using this

ASP.NET Core Web API - Cannot instantiate implementation type 'System.Net.Http.IHttpClientFactory' for service type

I am trying to use Dependency Injection to register service in ASP.NET Core-6 Web API. I got this interface: public interface IHttpClientService { Task<T