MVC .Net Core Model Validation - The value '' is invalid. Error

I am trying to use Model Validation in MVC .Net Core and can't manage to replace this default error message 'The value '' is invalid'. In theory, we can replace our own custom error message by using ...

Get current Activity - Xamarin Android

I am developing an portable App for Android and iOS. My current function is taking a Screenshot and use that image in the code. Therefor I have an Interface in the portable library. ``` public interf...

Entity Framework core - Contains is case sensitive or case insensitive?

"Contains" in Entity Framework core should equivalent to the SQL %like% operator. Therefore "Contains" should be case insensitive however it is case sensitive! (at least in postgres????) The followin...

Entity Framework Core - setting the decimal precision and scale to all decimal properties

I want to set the precision of all the decimal properties to (18,6). In EF6 this was quite easy: ``` modelBuilder.Properties<decimal>().Configure(x => x.HasPrecision(18, 6)); ``` but I can't seem t...

Development server of create-react-app does not auto refresh

I am following a [tutorial](https://egghead.io/courses/react-fundamentals) on React using create-react-app. The application is created by [create-react-app](https://github.com/facebookincubator/creat...

7 Apr at 09:47

How to write thread-safe C# code for Unity3D?

I'd like to understand how to write thread safe code. For example I have this code in my game: ``` bool _done = false; Thread _thread; // main game update loop Update() { // if computation done...

7 Apr at 11:41

Setting the version number for .NET Core projects - CSPROJ - not JSON projects

This question is very similar to [Setting the version number for .NET Core projects](https://stackoverflow.com/questions/36057041/setting-the-version-number-for-net-core-projects), but not the same. U...

Download to excel - Service Stack

I have a servicestack doing download to excel as below ``` $.ajax({ url: url, type: 'Get', async: true, data: data, success: function (data) { var blob = new Blob([da...

23 May at 05:12

Error message "Linter pylint is not installed"

I want to run Python code in Microsoft Visual Studio Code but it gives an error: > Linter pylint is not installed I installed: - - - How can I install Pylint?

22 Jan at 09:49

Converting between C# List and F# List

Remark: This is a self-documentation, but if you have any other suggestions, or if I made any mistakes/miss out something obvious, I would really appreciate your help. Sources: [convert .NET generi...

23 May at 12:10

Process finished with exit code 137 in PyCharm

When I stop the script manually in PyCharm, process finished with exit code 137. But I didn't stop the script. Still got the exit code 137. What's the problem? Python version is 3.6, process finished...

7 Apr at 01:17

Trying to use fetch and pass in mode: no-cors

I can hit this endpoint, `http://catfacts-api.appspot.com/api/facts?number=99` via Postman and it returns `JSON` Additionally I am using create-react-app and would like to avoid setting up any server...

Can I do an UPDATE on a JOIN query with OrmLite on ServiceStack?

I want to do an update for a specific field on a table based on the results from a query that includes a join. Using OrmLite with ServiceStack. My Classes are as follows: ``` public class Document ...

6 Apr at 16:33

Convert png to jpeg using Pillow

I am trying to convert png to jpeg using pillow. I've tried several scrips without success. These 2 seemed to work on small png images like this one. [](https://i.stack.imgur.com/m2GGn.jpg) First co...

How to build .csproj with C# 7 code from command line (msbuild)

I use some C# 7 features in my project: ``` static void Main(string[] args) { } public byte ContainerVersion { get => 1; private set => throw new NotImplementedException(); } ``` and it bu...

6 Sep at 08:44

Dependent DLLs of a NuGet package not copied to output folder

I got an issue with a custom Nuget package I've created. Let's call it MyCompany.Library.nupkg. It is hosted on an corporate Artifactory Nuget repo. This package depends on Newtonsoft.Json. For some r...

11 Apr at 09:58

Page Navigation using MVVM in Xamarin.Forms

I am working on xamarin.form cross-platform application , i want to navigate from one page to another on button click. As i cannot do `Navigation.PushAsync(new Page2());` in ViewModel because it only ...

Is a += b operator of char implemented same as a = a + b?

Found an interesting issue that following code runs with a different result: ``` char c = 'a'; c += 'a'; //passed c = c + 'a'; //Cannot implicitly convert type 'int' to 'char'. An explicit convers...

6 Apr at 18:41

.NET Core bluetooth

I'm currently creating an application in .NET core. I want to run this application on a Raspberry Pi Zero W and use the Bluetooth functionality to communicate with an external device (Light Bulb with ...

9 Apr at 15:14

'Connect-MsolService' is not recognized as the name of a cmdlet

``` PSCommand commandToRun = new PSCommand(); commandToRun.AddCommand("Connect-MsolService"); commandToRun.AddParameter("Credential", new PSCredential(msolUsername, msolPassword)); powershell.Streams...

9 Feb at 20:43

Mocking MediatR 3 with Moq

We've recently started using MediatR to allow us to de-clutter controller actions as we re-factor a large customer facing portal and convert it all to C#. As part of this we are increasing our unit te...

5 Feb at 13:3

Redis ids:xyz is a set of all keys in urn:xyz - no grooming

We are experience that for every key we are storing in redis urn:xyz a entry in a set ids:xyz is created automatically. see following printscreen [](https://i.stack.imgur.com/J6p98.png) while our ke...

6 Apr at 09:28

Possible to set column ordering in Entity Framework

Is there any possible configuration to set database column ordering in entity framework code first approach..? All of my entity set should have some common fields for keeping recordinfo ``` public D...

Why using multiple database in same instance a bad idea in Redis?

I am new to redis therefore I don't know more about its complex technicalities. But let me put my scenario here: I am running two websites from same server and I wanted redis to work on both. On searc...

23 May at 12:10

Parameterizing a ServiceStack custom SQL query

I have the following custom SQL Query with OrmLite: ``` var results = db.Select<Tuple<Customer,Purchase>>(@"SELECT c.*, 0 EOT, p1.* FROM customer c JOIN purchase p1 ON (c.id = p1.customer_id)...

6 Apr at 02:57