.NET core dependency injection to hosted service
My .net core app needs to crawl data in a specified time interval. I have chosen to implement `IHostedService` to run it in parallel with API. The hosted service needs some services injected. I regist...
- Modified
- 7 May at 03:53
How to add all projects to a single solution with dotnet sln?
Following examples from [here](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-sln) I'm trying to execute ``` dotnet sln AllProjects.sln add **/*.csproj ``` But I get this error: > Cou...
- Modified
- 25 Aug at 12:28
ASP.NET Core NullReferenceException when just accessing model
I am having trouble with attempting to create a view with a strongly typed model. No matter what I pass in as the model to a `View()`, I always receive a `NullReferenceException` when even just access...
- Modified
- 25 Aug at 07:4
DbProviderFactories.GetFactoryClasses returns no results after installing .NET SQL Client in .NET Core 2.1
I'm porting a library over to .NET Core 2.1 now that it has support for DbProviderFactory. For the most part it has gone fine - it compiles, but when run I get an error: > System.ArgumentException: '...
- Modified
- 27 Aug at 16:19
execute stored procedure in entity Framework Core without expecting map to dbset
I am working on .NET CORE, Entity Framework core. I have stored procedure that I need to execute from .NET class. My stored procedure takes number of 'Context' and I don't know how to deal this, altho...
- Modified
- 24 Aug at 12:24
How to configure ServiceStack.Text to use EnumMember when serializing to csv or jsv?
This is a follow up question to my earlier question about [ServiceStack.Text and deserializing json to .Net enums](https://stackoverflow.com/q/51854666/10228027). The answer to that question resolves ...
- Modified
- 24 Aug at 09:58
How to manually mapping DTO WITHOUT using AutoMapper?
I'm learning C#.NET Core and trying to create DTO mapping without using AutoMapper as I'm working on a small project alone and want to understand fundamental before using extra packages, surpringly I ...
- Modified
- 24 Aug at 09:18
ServiceStack.OrmLite: Support for sql native JSON types and indexing?
Our current data model has sub-objects, something like ``` BaseObject-->NodeStart-->SomeDateTime ``` and so on. In our current, custom implemented data handling, we "serialize" the complex objects ...
- Modified
- 23 Dec at 14:4
How can I clean (reset cache) of React Native using Expo. Not sure if it is cache issue
I am building a simple React Native app with create-react-native-app using only react-navigation and base-64(base 64 encode/decode) as dependencies. Over time starting the app became slower and now so...
- Modified
- 24 Aug at 06:24
TypeError: Object(...) is not a function reactjs
I was trying to clean up this react component by extracting `fillCalendar()` from being a method of the component into it's own js file and importing it instead. Originally this.state.datesArray was s...
- Modified
- 24 Aug at 04:26
How to integrate Python Code with C#.Net Core language?
Am trying to integrate python code in my .net core application for data analysis and some machine learning classification. How can I do this the best way? Note: I don't want to execute scripts with ...
- Modified
- 10 Sep at 22:52
Consuming a custom stream (IEnumerable<T>)
I'm using a custom implementation of a `Stream` that will stream an `IEnumerable<T>` into a stream. I'm using this [EnumerableStream](https://gist.github.com/rdavisau/6e00bfe4a769ddc9338c) implementat...
- Modified
- 26 Jul at 07:28
Possible .NET JIT call parameter lifetime bug?
I've been chasing down the cause of an intermittent crash in one of our .NET services due to an internal error in the .NET Runtime (exit code 0x80131506). The service in question doesn't perform any o...
- Modified
- 24 Aug at 07:32
Getting general information about MongoDB collections with FSharp
Can I retrieve basic information about all collections in a `MongoDB` with `F#`? I have a `MongoDB` with > 450 collections. I can access the db with ``` open MongoDB.Bson open MongoDB.Driver open M...
dotnet build - get error "could not return the default page '/index.html'"
try to generate my project into exe file, but get error: ``` indows DPAPI to encrypt keys at rest. Hosting environment: Production Content root path: C:....\currencyColution\correncyProject\bin\Debu...
- Modified
- 20 Jun at 09:12
"Inspecting the state of an object in the debuggee of type System.Reflection.MethodBase is not supported in this context"
I don't know what this error means. I am using Visual Studio for Mac 7.5.0 Community version. I am using lazy loading in Entity Framework with ASP.NET Core. ``` public partial class AdminUser { ...
- Modified
- 24 Jun at 20:35
Excel as inlay frame in WPF has disabled ExcelWorksheet
I found a solution to setup Excel instance in WPF by using the [SetParent()](https://msdn.microsoft.com/en-us/library/windows/desktop/ms633541(v=vs.85).aspx) function of Windows. Problem is, that mo...
C# Deserialize List<someobject> restfully with ServiceStack
I'm attempting to receive a POSTed List of POCO but I'm unable to deserialize either via the Swagger API or via Postman when submitting over the wire. I've serialized the object back out to confirm h...
- Modified
- 23 Aug at 21:46
Type 'void' is not assignable to type '((event: MouseEvent<HTMLInputElement>) => void) | undefined'
``` import * as React from "react"; import "./App.css"; import PageTwo from "./components/PageTwo"; export interface IPropsk { data?: Array<Items>; fetchData?(value: string)...
- Modified
- 23 Aug at 03:10
What is the difference between HashRouter and BrowserRouter in React?
I am new to programming which makes things slightly difficult for me to understand if I read the official docs. I was reading about [React Router 4 from here](https://medium.com/@djoepramono/react-rou...
- Modified
- 7 May at 20:41
Visual Studio 15.8.1 not running MS unit tests
When I updated Visual Studio to the latest version, 1 of my test projects stopped running tests and outputted this message: > Test project {} does not reference any .NET NuGet adapter. Test discovery ...
- Modified
- 23 Aug at 13:29
When should I await my asyncs?
We're currently refactoring sections of our project to be async up and down, yay! Due to our different understanding, me and a colleague (let's call him Jim), have differing opinions about how our as...
- Modified
- 25 Aug at 07:19
Managed C++ with .NET Core 2.1
We have a library written in C++. To make it more compatible with our more modern .NET projects, we wrapped this C++ library in another .NET project. It works fine when referencing it from full .NET F...
- Modified
- 14 Mar at 18:56
Jest 'TypeError: is not a function' in jest.mock
I'm writing a Jest mock, but I seem to have a problem when defining a mocked function outside of the mock itself. I have a class: ``` myClass.js class MyClass { constructor(name) { this.name = ...
- Modified
- 29 Sep at 20:45
Kubernetes Pod Warning: 1 node(s) had volume node affinity conflict
I try to set up Kubernetes cluster. I have Persistent Volume, Persistent Volume Claim and Storage class all set-up and running but when I wan to create pod from deployment, pod is created but it hangs...
- Modified
- 22 Jan at 21:36