FluentAssertions: Assert Collection contains Element that "IsEquivalentTo"

I'm stuck with what I thought was an easy example. I want to assert that a collection of objects contains an object that is to a given object. like: `col.ShouldContainEquivalentTo(obj)` ``` var obje...

28 Jun at 22:24

How Do I Manually Validate a JWT Asp.Net Core?

There are millions of guides out there, and none of them seem to do what I need. I am creating an Authentication Server, that simply just needs to issue, and validate/reissue tokens. So I can't create...

30 Oct at 22:1

AutoMapper unable to cast TestDbAsyncEnumerable to IQueryable

I've implemented the TestDbAsync fakes from [https://msdn.microsoft.com/en-us/library/dn314429(v=vs.113).aspx](https://msdn.microsoft.com/en-us/library/dn314429(v=vs.113).aspx) and I want to be able t...

28 Jun at 16:7

Configure Json.NET serialization settings on a class level

I want my class to be serialized and deserialized using camel case naming convention. I know I can use the `JsonConvert.SerializeObject(object, settings)` overload as stated [here](https://stackoverfl...

5 May at 15:51

Can JsonServiceClient's OnUploadProgress be combined with .WithCache()?

In ServiceStack, you can create a JsonServiceClient and listen to the upload progress like this: ``` var client = new JsonServiceClient("http://api.example.org"); client.OnUploadProgress += (done, to...

28 Jun at 10:0

Trouble understanding yield in C#

I'm hoping to get some clarification on a snippet that I've recently stepped through in the debugger, but simply cannot really understand. I'm taking a course on and the current topic is on `yield`...

28 Jun at 09:42

generate swagger spec from servicestack api

I am using servicestack as REST framework. The swagger UI plugin is very help full for manual testing and debugging. Now I want to do more automatic testing, performance testing, with a tool like So...

28 Jun at 08:41

How to set a background image in reactjs?

I have a reactjs/webpack app and trying to set a background image for the `body` tag: ``` body{ background: url("../images/some-background.jpg"); background-size:contain; background-positi...

1 Jul at 15:34

Null-conditional operator and !=

With the introduction of [Null-Conditional Operators](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/null-conditional-operators) in C#, for the following evaluation, ```...

28 Jun at 08:57

Cannot install Microsoft Power Bi Postgre SQL connector

I am trying to use Microsoft Power Bi to connect to a PostgreSQL database. When I go to it just says that 1. I have installed Microsoft Power Bi version: 2.47.4766.801 64-bit (June 2017). 2. I ha...

VS 17 breaking on all exceptions

Visual Studio 2017 is (kind of suddenly) breaking on exceptions. That means, if I deactivate them in the exceptions settings (pressing CTRL + ALT + E while debugging), the debugger still breaks on th...

Is there a better way to pass dynamic inputs in-line to a DataTestMethod? I.e. How to programmatically create test inputs for a data-driven test

I've been looking for this for years and years, and I think I've finally found a real way in "MSTest V2" (meaning the one that comes with .netcore, and is only really handled correctly in Visual Studi...

27 Jun at 20:55

Scaffold new tables and keep the existed ones?

I've scaffolded a few tables in a C# project. Now I need to scaffold a new table. I don't want to re-scaffold the existed ones because there were some changes. ``` Scaffold-DbContext "Server=...;Dat...

27 Jun at 20:54

c# convert datetime object to iso 8601 string

I'm trying to convert a DateTime object to a ISO8601 string but keep getting wrong results. I've looked around on stackoverflow, but couldn't find the right solution. I start with a date time strin...

27 Jun at 19:25

Warning: Use the 'defaultValue' or 'value' props on <select> instead of setting 'selected' on <option>

A user has a dropdown and he selects an option. I want to display that dropdown and make that option a default value which was selected by that user last time. I am using attribute on option but Re...

28 May at 23:18

net core web api json serialization - need fields prefixed with $

I'm using net core web api and need to return a payload with property name "$skip". I tried using the DataAnnotations: ``` public class ApiResponseMessage { [Display(Name ="$skip", ShortName = "$...

27 Jun at 17:19

How can I delete all local Docker images?

I recently started using Docker and never realized that I should use `docker-compose down` instead of `ctrl-c` or `docker-compose stop` to get rid of my experiments. I now have a large number of unnee...

31 Aug at 12:52

EF Core add-migration Build Failed

I have a developer that is getting "Build failed." when running add-migration in a .NET Core EF project, with no explanation of why the build failed. How do you troubleshoot this error? This is what ...

ServiceStack AutoQuery into custom DTO

So, I'm working with ServiceStack, and know my way around a bit with it. I've used AutoQuery and find it indispensable when calling for straight 'GET' messages. I'm having an issue though, and I hav...

Retrieving exceptions when ReplyTo is a temp queue

Our application uses temporary queues to direct service bus responses to the originating caller. We use the built-in `ServiceStack.RabbitMq.RabbitMqServer` to publish and handle messages. ``` Message...

Split batch of messages to be sent to Azure Service Bus

Let's say I have a collection `List<BrokeredMessage>` of messages that I want to batch-send to Azure Service Bus. The collection size is arbitrary, so the total size of all messages combined might b...

27 Jun at 11:57

Enable both Windows authentication and Anonymous authentication in an ASP.NET Core app

I know that this has been asked many times before, but unfortunately not about ASP.NET Core web apps, just the classic ASP.NET web apps. All the answers i've found on the internet don't help me, becau...

Angular CLI - Please add a @NgModule annotation when using latest

I'm new to Angular, so please excuse any new comer stupidity here. - - - - - > compiler.es5.js:1689 Uncaught Error: Unexpected directive 'ProjectsListComponent' imported by the module 'Proje...

HttpContextBase namespace could not be found

``` public string GetCartId(HttpContextBase context) { if (context.Session[CartSessionKey] == null) { if (!string.IsNullOrWhiteSpace(context.User.Identity.Name)) { ...

2 Aug at 05:4

libstdc++.so.6: version `GLIBCXX_3.4.20' not found

To upload the raw-reads > 2GB to SRA on Genebank, I installed aspera connect plug-in on ubuntu 16.04. But the plug-in did not pop up as indicated by the instruction on the genebank SRA portal. I go...

27 Jun at 06:9