Why does a property inherited from an interface become virtual?
Say I have one interface and two classes, and one of the classes implement this interface: ``` interface IAAA { int F1 { get; set; } } class AAA1 { public int F1 { get; set; } public int...
- Modified
- 27 Nov at 13:48
Create text file and download without saving on server in ASP.net Core MVC 2.1
I've found a way to create a text file then instantly download it in the browser without writing it to the server in regular ASP.net: [Create text file and download](https://stackoverflow.com/questio...
- Modified
- 27 Nov at 00:26
ASP.NET Core 2.1 cookie authentication appears to have server affinity
I'm developing an application in ASP.NET Core 2.1, and running it on a Kubernetes cluster. I've implemented authentication using OpenIDConnect, using Auth0 as my provider. This all works fine. Action...
- Modified
- 26 Nov at 23:33
Numpy, multiply array with scalar
Is it possible to use ufuncs [https://docs.scipy.org/doc/numpy/reference/ufuncs.html](https://docs.scipy.org/doc/numpy/reference/ufuncs.html) In order to map function to array (1D and / or 2D) and sca...
- Modified
- 26 Nov at 16:25
MissingMethodException Global.asax.cs
Because of this blog-post: [https://www.radenkozec.com/8-ways-improve-asp-net-web-api-performance/](https://www.radenkozec.com/8-ways-improve-asp-net-web-api-performance/) I´ve tried to replace JSON.n...
- Modified
- 20 Jun at 09:12
ASP.NET Core Api-Gateway middleware
I am new to API gateways and have a question of understanding. I try too put a series of (micro)services behind an endpoint. For this purpose, I have set up an ASP.NET Core Application and added the ...
- Modified
- 26 Nov at 09:11
MySQL Workbench reports "is not valid at this position for this server version" error
For the following SQL query: ``` SELECT COUNT (distinct first_name) from actor; ``` I receive the following error message: ``` "SELECT" is not valid at this position for this server version, expec...
- Modified
- 26 Nov at 03:13
Difference between DbSet<T> property and Set<T>() function in EF Core?
Given this kind of context: ``` public class FooContext : DbContext { public FooContext(DbContextOptions<FooContext> opts) : base(opts) { } public DbSet<Bar> Bars { get; set; } } ``` ...
- Modified
- 25 Nov at 16:26
.NET Core equivalent to Thread.Abort
## Background I have a `Service` abstraction. Each service has it own `WorkItem`. WorkItem able to start with some data. The service is limiting the excution time of `WorkItem`. Let's say that a si...
- Modified
- 18 Feb at 10:30
How to use componentWillMount() in React Hooks?
In the official docs of React it mentions - > If you’re familiar with React class lifecycle methods, you can think of useEffect Hook as componentDidMount, componentDidUpdate, and componentWillU...
- Modified
- 25 Nov at 04:13
Why is 2 * (i * i) faster than 2 * i * i in Java?
The following Java program takes on average between 0.50 secs and 0.55 secs to run: ``` public static void main(String[] args) { long startTime = System.nanoTime(); int n = 0; for (int i =...
- Modified
- 16 Jul at 13:14
SqlExpression Creating Upper SQL Query
I have the following code: ``` SqlExpression<Postcodes> sqlExpression = db.From<Postcodes>() .Where(x => x.CityId.StartsWith(searchString)) .OrderBy(x => x.Cit...
- Modified
- 23 Nov at 11:48
Joining same table multiple times in ServiceStack.OrmLite
When joining a table to itself, the sql statment generated does not reference the tables correctly. It's working when the "main" table is different from the joining table [https://github.com/Service...
- Modified
- 22 Nov at 22:54
Get a list of all NuGet packages used in a solution
I'm looking for a way to get a list of all used NuGet packages in every project in a solution (and specifically the version) using command-line script and not manually in Visual Studio. Using the Pac...
Nuget restore fails on Azure Devops with message "unable to load the service index for source"
I have a build for a .NET solution that is running in a private agent. The solution contains both .NET Core 2.1 and .NET Standard 2.0 projects. Some of the nuget packages installed are the following...
- Modified
- 26 Nov at 10:21
response: 413 Request Entity Too Large
When POSTing a request which can contain one or more files (as base64 string) I get this error response: > ERROR 2018-11-22 09:54:18,244 [13 ] Mvc.ExceptionHandling.AbpExceptionFilter - The remote ...
- Modified
- 22 Nov at 11:42
Textfield validation in Flutter
I am working on Flutter `TextField` widget. I want to show an error message below the `TextField` widget if the user does not fill that `TextField`. I only have to use `TextField` Widget not `TextForm...
services.Configure<>() or services.AddSingleton().Get()?
As known there are two ways to get option classes in ASP.NET Core 2: 1. Using services.Configure<>() like this: services.AddOption(); services.Configure<ApplicationOptions>(Configuration.GetSection(...
- Modified
- 22 Nov at 13:13
Comparing two equal timestamps with '>' operator returns true
I am writing a query in OrmLite like: ``` var items = db.Select<CustomTable>(query => query .Where(record => record.UpdateTimestamp > lastUpdateTime) .OrderBy(...
- Modified
- 23 Nov at 08:34
How to read a binary file quickly in c#? (ReadOnlySpan vs MemoryStream)
I'm trying to parse a binary file as fastest as possible. So this is what I first tried to do: ``` using (FileStream filestream = path.OpenRead()) { using (var d = new GZipStream(filestream, Compr...
- Modified
- 27 Dec at 05:34
Independent versioning of packages in a mono-repo
We just started working on something that is maybe best described as a company-wide "open" source framework. Our main language is C# and we use Jenkins and ProGet to create and share nuget-packages. W...
- Modified
- 21 Nov at 12:15
System.Net.Http.HttpClient Disable Caching (.Net Standart Project)
In my .NET Standard project I'm using `System.Net.Http.HttpClient`. How can I disable all caching (request caching especially) in `HttpClient`? If server sends responses with no cache header problem s...
- Modified
- 27 Dec at 06:47
Change the IDENTITY property of a column, the column needs to be dropped and recreated
I am using This was my initial model definition. ``` public class Customer //Parent { public int Id { get; set; } public string Name { get; set; } public string Email { get; set; } ...
- Modified
- 21 Dec at 23:41
Getting output buffer from DBMS_OUTPUT.GET_LINES in C#
I'm trying to get the output from the `DBMS_OUTPUT.PUT_LINE()` method in my anonymous PL/SQL block through C#. I've looked at a couple of other related questions here, but am still having trouble. The...
- Modified
- 3 Dec at 17:43
Does creating an instance of a child class create an instance of the parent class?
I'm new to C#, and I wanted to know, that if I create an instance of a child class, does it also automatically create an instance of the parent class or what? Here is my code: ``` class Program { ...