How do I hide AutoQuery endpoints in metadata page on external service?

I have two services, service A and service B. Service A calls Service B, so I have added a reference to service B's service model into service A. The issue I am running into, is that any AutoQuery o...

30 Sep at 14:9

Migrating from EF Core 2 to EF Core 3

After upgrading my project from (dotnet core 2/ef core 2) to (dotnet core 3/ef core 3) almost all of my entity framework LINQ queries are broken. while I already read [this](https://learn.microsoft.co...

Final message in server events not being pushed until heartbeat

We are having an issue with the final message sent over service stack waiting until the next heart beat to be sent. We believe it to be similar to : [Servicestack server sent events](https://stackove...

30 Sep at 12:0

ASP.NET Core 3.0 get_HostingEnvironment() Method not found in extension

Below code to replicate error for some extensions I'm trying to create in a new ASP.NET Core 3.0 API project. ``` using ClassLibrary1; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.H...

EF Core 3 x.Contains() in expression where x is ICollection

I've got the following data layer setup: ``` public class Repository : IRepository { private readonly MyDbContext _dbContext; public List<Meter> Search(Expression<Func<Meter,bool>> crit...

How to provide mock values in a FeedResponse for CosmosSDK v3+?

I'm writing a data access layer for my application and trying to mock out the CosmosDB SDK dependency for unit testing. I am using NUnit with NSubstitute and have come across the issue where I am tryi...

5 May at 16:49

'Could not find file ... bin\roslyn\csc.exe'

In Visual Studio 2017, when hitting + to run my ASP.NET Framework Web API server, I get: ``` Could not find file ... bin\roslyn\csc.exe: ``` [](https://i.imgur.com/sohAXxi.png) Running `Update-Packag...

29 Jun at 17:12

System.InvalidCastException: 'The SqlParameterCollection only accepts non-null SqlParameter type objects, not SqlParameter objects.'

I migrated my project from ASP.NET Core 2.2 to ASP.NET Core 3.0. Now I get this exception. In ASP.NET Core 2.2 it was using `FromSql()`; now it is using `FromSqlRaw()`. I am calling my procedure using...

ASP.NET Core 3.0 [FromBody] string content returns "The JSON value could not be converted to System.String."

Using `[FromBody]` string content on an `ApiController` in ASP.NET Core 3.0 returns a validation error: ``` {"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title":"One or more validat...

Is there a System.Text.Json's substitute for Json.NET's JsonProperty(Order)?

Since `System.Text.Json` is now JSON lib for [.NET Core 3.0](https://learn.microsoft.com/en-us/dotnet/api/system.text.json?view=netcore-3.0), is there an attribute/param matching Json.NET's [JsonProp...

How to use class fields with System.Text.Json.JsonSerializer?

I recently upgraded a solution to be all .NET Core 3 and I have a class that requires the class variables to be fields. This is a problem since the new `System.Text.Json.JsonSerializer` doesn't suppor...

Running actions in another directory

I've just started exploring Github actions however I've found myself placing a command in multiple places. I have a PHP project where the `composer.json` is not in the root, my structure looks like:...

28 Sep at 10:29

System.Text.Json.JsonElement ToObject workaround

I want to know the equivalent of the `ToObject<>()` method in [Json.NET](https://www.newtonsoft.com/json/help/html/Introduction.htm) for . Using Json.NET you can use any `JToken` and convert it to a c...

10 Aug at 14:32

Client side GroupBy is not supported

I have the following Entity Framework Core 3.0 query: ``` var units = await context.Units .SelectMany(y => y.UnitsI18N) .OrderBy(y => y.Name) .GroupBy(y => y.LanguageCode) .ToDictionaryAsync(...

ServiceStack.RequestFilterAsyncAttribute error: System.ArgumentNullException: Value cannot be null. Parameter name: method

I got runtime error and also find a way to fix (in the end). Just curious why cannot use public property for constructor. `RequestFilterAsyncAttribute` or `RequestFilterAttribute` doesn't matters, btw...

29 Sep at 02:38

How to create a signing certificate and use it in IdentityServer4 in production?

Most (all?) the sample code on the [IdentityServer4 docs site](https://identityserver4.readthedocs.io/en/latest/) uses `AddDeveloperSigningCredential()`, but recommends using `AddSigningCredential()` ...

6 Oct at 03:15

How to configure client for access with authsecret?

I'm using the client and I need to call a service using authsecret parameter. If I ad this param to the base url it give me a serialization error. ``` String baseUrl = AppConfig.GetAppApiUrl(); var c...

30 Sep at 07:30

'ConfigureServices returning a System.IServiceProvider isn't supported.'

I need ti use this `AutoFac` in ASP core 3.0 When I use this code in startu up: ``` public IServiceProvider ConfigureServices(IServiceCollection services) { services.AddControllers(); return...

Has been compiled by a more recent version of the Java Runtime (class file version 57.0)

I get this problem Using IntelliJ. But I have the newest version of everything newly installed on my system. I've set: PATH as C:\Program Files\Java\jdk-13 JAVA_HOME as: C:\Program Files\Java\jdk-...

26 Sep at 23:38

Grpc .Net client fails to connect to server with SSL

Unable to connect to the greeter grpc service mentioned in this link - https://learn.microsoft.com/en-us/aspnet/core/tutorials/grpc/grpc-start?view=aspnetcore-3.0 from a greeter client which is writte...

7 May at 03:50

When to use JSX.Element vs ReactNode vs ReactElement?

I am currently migrating a React application to TypeScript. So far, this works pretty well, but I have a problem with the return types of my `render` functions, specifically in my functional component...

28 Sep at 18:19

IIS Custom field logging through HTTP Request in ASP NET Core

I have enabled IIS logging with custom fields for my website. [](https://i.stack.imgur.com/F6bNb.png) Previously in MVC, I have used HTTPHandlers and Module to add the above fields to the HTTP Requ...

Store computed property with Entity Framework Core

I'll try and illustrate my question with an oversimplified example: Imagine I have a domain entity like this: ``` public class Box { public int Id { get; set; } public int Height { get; set; ...

26 Sep at 12:52

What is the difference between an interface with default implementation and abstract class?

C# 8.0 has introduced a new language feature – default implementations of interface members. ``` public interface IRobot { void Talk(string message) { Debug.WriteLine(message); } ...

How to set hosting environment name for .NET Core console app using Generic Host (HostBuilder)

I am setting up a .NET Core 2.x console app as a Windows service and need to load an appsettings json file based on the environment. I was thinking to start the service with a command line argument t...

23 Nov at 00:43