Questions

Updating to EF 6.2.0 from EF 6.1.3 causes cannot access a disposed object error

I'm working with SQLite. I am able to use entity framework 6.1.3 in my WPF application without problems, but when I update it to 6.2.0 I get the following error: ``` Test method DataAccessLayerTests....

asp.net Core mvc hide and exclude Web Api Controller Method

I know there is the attribute ``` [ApiExplorerSettings(IgnoreApi = true)] public async Task<IActionResult> MyMethod(int id) ``` But that does not stop a client of the api to call the endpoint meth...

21 Apr at 09:5

Where is c# 7.2 in visual studio project settings?

Ive seen people using and discussing c# 7.2 features but I cant seem to find it. Ive got latest updates and only up to version `7.1` is listed. why and how can I get v7.2? [](https://i.stack.imgur.c...

Running a .NET core app (.dll) with cmd by using process.start

I'm new to .NET Core 2.0, so i might be doing this all wrong, if so let me know. I have a .NET core 2.0 app that should be cross platform, hence the app is a .dll console application, and it does wor...

16 Nov at 09:59

AttributeError: module 'matplotlib' has no attribute 'plot'

I am using python 3.6 and a learner. Below is a simple code of a sin wave. ``` import matplotlib.pyplot as plt import numpy as np x = np.linspace(-10 , 10, 100) y = np.sin(x) plt.plot(x, y, mark...

19 Sep at 19:37

Is it possible to access the compressed data before decompression in HttpClient?

I'm working on the [Google Cloud Storage .NET client library](https://googlecloudplatform.github.io/google-cloud-dotnet/docs/Google.Cloud.Storage.V1/index.html). There are three features (between .NET...

No authenticationScheme was specified, and there was no DefaultChallengeScheme found with default authentification and custom authorization

I have a .NET Core 2.0 app and have a problem with authorization. I want to use custom authorization with special requests. Header and standard default authentication. First, I add configuration in `S...

1 May at 13:48

ServiceStack select projection not working as expected

ServiceStack select projection not working as expected Here is example ``` var q = db.From<Product>() .Select<Product>(p=> new { ...

16 Nov at 06:32

Vue.js dynamic <style> with variables

Is it possible to add the dynamic variable in style? I mean something like: ``` <style> .class_name { background-image({{project.background}}); } @media all and (-webkit-min-device...

13 Nov at 04:45

How do I convert a C# string to a Span<char>? (Span<T>)

How do I convert a string to a Span<T>? ``` Span<char> mySpan = "My sample source string"; ```

16 Nov at 04:52

What is the difference between Span<T> and Memory<T> in C# 7.2?

C# 7.2 introduces two new types: `Span<T>` and `Memory<T>` that have better performance over earlier C# types like `string[]`. Question: What is the difference between `Span<T>` and `Memory<T>`? Why ...

4 Apr at 16:17

How to add a database retrieved value custom claim to JWT Token using ServiceStack

In AppHost.Configure I have the following code: ``` Plugins.Add(new AuthFeature(() => new AuthUserSession(), new IAuthProvider[] { new JwtAuthProvider { HashAlgorithm ...

16 Nov at 01:1

MSBuild restore target - MSB4057: The target "restore" does not exist in the project

We have over 20 solutions in our main product portfolio (over 880 projects), and we have a complex set of build scripts that work well, but we are trying to automate the restore of nuget packages from...

How to reference static assets within vue javascript

I'm looking for the right url to reference static assets, like images within Vue javascript. For example, I'm creating a leaflet marker using a custom icon image, and I've tried several urls, but the...

15 Nov at 16:57

How to get Index of an Item in ICollection<T>

I have this list of cars and I also have a single car object, which I know is in the ICollection how do I get the index/position of the car in the list? I need to add it to a list of strings This is...

6 May at 00:56

Multiple AuthProvider Servicestack

I am having some issue to make work 2 auth provider at the same time for servicestack. I am using the : I am my users get authenticate fine. Still Now I would like to use the for a few external 3r...

15 Nov at 13:13

C# rounding differently depending on platform?

I have this tiny piece of code ``` double s = -2.6114289999999998; double s7 = Math.Round(s, 7); double s5 = Math.Round(s, 5); double s6 = Math.Round(s, 6); ``` With Platform = Any CPU, I get ``` ...

15 Nov at 08:44

ASP.NET Core CreatedAtRoute No route matches the supplied values

Using ASP.NET Core 2.0.0 Web API, I'm trying to build a controller to do a database insert. The information can be inserted into the database just fine, but returning a CreatedAtRoute throws an 'Inval...

Multiple types in one dynamic assembly is way slower than multiple dynamic assemblies with one type each

So I'm emitting some dynamic proxies via `DefineDynamicAssembly`, and while testing I found that: - - In my test I generate 10,000 types, and the one-type-per-assembly code runs about 8-10 times fa...

14 Nov at 22:2

How do I POST XML data to a webservice with Postman?

I want POST an XML request to a webservice using Postman. However, when I check the available request formats, I only see options for `form-data`, `x-www-form-urlencoded`, `raw`, and `binary`. How do...

14 Nov at 21:40

DDD: Referencing MediatR interface from the domain project

I'm just getting started with DDD. I'm putting domain events into a CQRS application and I'm stumbling on a fundamental task: How to use the MediatR.INotification marker interface within the domain pr...

14 Nov at 18:33

When is the best place to use Task.Result instead of awaiting Task

Whilst I've been using async code in .NET for a while, I've only recently started to research it and understand what's going on. I've just been going through my code and trying to alter it so if a ta...

14 Nov at 11:16

Visual Studio 2017 package tab is missing in project settings

I created a simple library .NET Framework project. I would like to generate NuGet packages after build as described [here](https://blog.nuget.org/20170316/NuGet-now-fully-integrated-into-MSBuild.htm...

12 Jun at 16:53

Convert Json string to Json object in Swift 4

I try to convert JSON string to a JSON object but after `JSONSerialization` the output is `nil` in JSON. Response String: ``` [{\"form_id\":3465,\"canonical_name\":\"df_SAWERQ\",\"form_name\":\"Acti...

15 Nov at 12:3

IDX10603: The algorithm: 'HS256' requires the SecurityKey.KeySize to be greater than '128' bits. KeySize reported: '32'. Parameter name: key.KeySize

I was just working with Asp.Net Core Web API, and implementing Authentication. And I am calling this API from an Angular Application. But I am always getting an error as below. > IDX10603: The algori...

1 Feb at 14:36