Questions

How to define references when one poco/table has a composite primary key

Considering the documentation [here](https://github.com/ServiceStack/ServiceStack.OrmLite), you can define foreign key relationships in your pocos like the given example: ``` public class Customer { ...

29 Jul at 00:6

Referencing mscorlib 4.0.0.0 from .NET Core 1.0 class library

I have a .NET Core 1.0 class library which targets .NET 4.6.1 and references the .NET Standard Library 1.6.0 and Identity Framework 2.2.1 ``` { "version": "1.0.0-*", "dependencies": { ...

How to get the parameter from a relative URL string in C#?

What's the most efficient way to get a specific parameter from a relative URL string using C#? For example, how would you get the value of the `ACTION` parameter from the following relative URL strin...

28 Jul at 20:28

Mixing async/await with Result

Let me just preface this question with a few things: 1. I've read several SO questions saying that you should **not** do this (such as [How to safely mix sync and async code][1]) 2. I've read [Async/A...

6 May at 01:1

How to load jinja template directly from filesystem

The [jinja API document at pocoo.org](http://jinja.pocoo.org/docs/dev/api/#) states: > The simplest way to configure Jinja2 to load templates for your application looks roughly like this:``` from jinj...

10 Jan at 01:12

Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type <MyClass>

This code: ``` var commandMessage = new CommandMessage { CorrelationId = Guid.NewGuid() }; var json = JsonConvert.SerializeObject(commandMessage); var myCommandMessage = (CommandMessage)JsonConvert.D...

28 Jul at 15:58

IdentityServer3 with ServiceStack and MVC Client

I'm new to IdentityServer3 and am just starting to get it set up. It seems to be going quite well and I've been working on the Hybrid flow for an MVC app similar to that shown in Kevin Dockx's Plurals...

Running async methods in parallel

I've got an async method, `GetExpensiveThing()`, which performs some expensive I/O work. This is how I am using it: ``` // Serial execution public async Task<List<Thing>> GetThings() { var first ...

28 Jul at 10:57

Disable compiler optimisation for a specific function or block of code (C#)

The compiler does a great job of optimising for RELEASE builds, but occasionally it can be useful to ensure that optimisation is turned off for a local function (but not the entire project by untickin...

ASP.NET Core Web API exception handling

I am using ASP.NET Core for my new REST API project after using regular ASP.NET Web API for many years. I don't see any good way to handle exceptions in ASP.NET Core Web API. I tried to implement an e...

9 Mar at 18:28

ASP.NET Core 1.0 on IIS error 502.5 - Error Code 0x80004005

I just updated my server (Windows 2012R2) to .NET Core 1.0 RTM Windows Hosting pack from the previous .NET Core 1.0 RC2. My app works on without any issues but the server keeps showing: ``` HTTP Erro...

Broken tab navigation in popup with WPF user control hosted inside Winforms in default AppDomain

I have a WPF user control that uses a Popup. This control is a plugin and can be loaded in the main AppDomain or in a separate AppDomain, and it is hosted in a Winforms form using ElementHost. When th...

17 Apr at 20:57

VSCode -- how to set working directory for debugging a Python program

How do I run a Python program under debug and set the working directory for the run?

9 Jun at 15:16

How can I prevent event bubbling in nested React components on click?

Here's a basic component. Both the `<ul>` and `<li>` have onClick functions. I want only the onClick on the `<li>` to fire, not the `<ul>`. How can I achieve this? I've played around with e.preventDe...

11 Mar at 17:43

Automapper performance

I'm using Automapper to map my business model to a ViewModel. It works, but it's very slow. I have a collection with 6893 objects with 23 properties (test environment, production should have much mo...

28 Jul at 15:14

iterate through all rows in specific column openpyxl

I cannot figure out how to iterate through all rows in a specified column with openpyxl. I want to print all of the cell values for all rows in column "C" Right now I have: ``` from openpyxl import...

27 Jul at 17:30

error: RPC failed; curl transfer closed with outstanding read data remaining

I'm facing this error when I try to clone a repository from GitLab (GitLab 6.6.2 4ef8369): ``` remote: Counting objects: 66352, done. remote: Compressing objects: 100% (10417/10417), done. error: RPC ...

10 Nov at 08:27

ASP.NET Core ILoggerProvider for database

I am in the middle of studying the ASP.NET Core, and I have implemented logging with a file system successfully, but how about implementing logging feature with a database solution. How to pass EF con...

5 Aug at 21:22

Button border thickness from code behind

I am very new to wpf, and right now I am working with buttons, and so I want to change buttons border thickness, but from code behind not in XAML, and what I did was next:

5 May at 17:47

HttpRequestException -- Is this a client or server issue?

Awhile ago I implemented some code to consume a REST Api using the `HttpClient` class. ``` using (var client = new HttpClient() { BaseAddress = new Uri(@"https://thirdparty.com") }) { client.Defa...

23 May at 12:22

how to delete installed library form react native project

I have installed a third party library in my project but it is not working , so I want to delete that library from my project , How can I do that ?

27 Jul at 13:3

How to upgrade pip3?

I want to use python3.5 for development, but many times when I install the module for python 3.5, it always fails. The terminal tells me that a higher version is available, but it doesn't work when I ...

24 Feb at 22:30

How to merge two arrays of objects by ID using lodash?

I have two array with one common field . how can I merge theme easily? ``` var arr1 = [{ "member" : ObjectId("57989cbe54cf5d2ce83ff9d6"), "bank" : ObjectId("575b052ca6f66a5732749ecc"), "count...

1 Jul at 23:24

Where are all the static members stored?

I'm trying to learn how C# manages memory. I am stuck on static elements, I read numerous blogs and articles on this subject, but I cannot find a quite satisfactory answer. Let's define a code block ...

Using Hangfire with ServiceStack

Is there a way of starting Hangfire background jobs from ServiceStack services? I've already been able to start jobs from within MVC where I can resolve ServiceStack services but I wanted to be able t...

27 Jul at 08:57