How can I use more than 2100 values in an IN clause using Dapper?
I have a List containing ids that I want to insert into a temp table using Dapper in order to avoid the SQL limit on parameters in the 'IN' clause. So currently my code looks like this: ``` public I...
- Modified
- 21 Sep at 07:0
How to access dbcontext & session in Custom Policy-Based Authorization
Is it possible that we can access dbcontext to get my table data and session in custom Policy-Based Authorization? Anyone can help how to achieve it? ``` services.AddAuthorization(options => ...
- Modified
- 19 Sep at 23:26
Ignore the Tasks throwing Exceptions at Task.WhenAll and get only the completed results
I am working on a Task parallel problem that I have many Tasks that may or may not throw Exception. I want to process all the tasks that finishes properly and log the rest. The `Task.WhenAll` propage...
- Modified
- 4 Apr at 07:42
How to get params from AuthorizationHandler .NET Core
I am using an authorization handler to put custom authorization in my controller in .net core. How can I get the parameters from the controller and use it to the authorization handler? In the old ....
- Modified
- 15 Jun at 14:29
Getting ServiceStack licensing error when .NET Trust level is not "Full"
We were required to lower .NET trust level for our WEB application using ServiceStack. However when .NET trust level is set to anything lower than "Full", ServiceStack fails to recognize the license....
- Modified
- 20 Sep at 08:30
How to keep user login in to system and logout only after user clicks on logout button?
I am using custom implementation of microsoft asp.net identity because i have custom tables that is why i have given custom implementation of all my methods . > Problem is when user logins then after...
- Modified
- 23 May at 12:25
Netstandard1.x Nuget packages cannot be installed for netstandard1.x projects
After doing a fresh Windows 10 installation along with latest Visual Studio 2015, netcore, and nuget tooling - I can no longer install Nuget packages to any .netstandard projects. Here's some example ...
- Modified
- 10 Jan at 13:43
Debug/run standard java in Visual Studio Code IDE and OS X?
Love the light-weight Visual Studio Code in OS X. Have always wanted the ability to write, debug and run standard java (NOT javascript) from VSC in OS X. Found the following extension which allows you...
- Modified
- 19 Sep at 21:34
pandas: find percentile stats of a given column
I have a pandas data frame my_df, where I can find the mean(), median(), mode() of a given column: ``` my_df['field_A'].mean() my_df['field_A'].median() my_df['field_A'].mode() ``` I am wondering is ...
- Modified
- 28 Jun at 01:26
Use settings from config files for `UseUrl(...)`?
I have an Asp.net core application with the following code. ``` public class Program { public static void Main(string[] args) { var host = new WebHostBuilder() .UseKestr...
- Modified
- 19 Sep at 19:1
Add claims when creating a new user
I am creating a new User using ASP.NET Core Identity as follows: ``` new User { Email = "john@company.com", Name = "John" } await userManager.CreateAsync(user, "password"); ``` I need to add a...
- Modified
- 17 Jun at 13:31
OnPlatform tags not working in Xamarin Forms
I'm using Xamarin Studio 6.1, recently upgraded it to work with a Xamarin Forms project. I can't seem to get the OnPlatform tags working. I'm trying something like this ``` <Grid Padding="12"> <...
- Modified
- 19 Sep at 16:17
How to move a file on Azure File Storage from one sub folder to another sub folder using the Azure Storage SDK?
I'm trying to figure out how to move a file in Azure File Storage from one location to another location, in the same share. E.g. ``` source -> \\Share1\someFile.txt destination -> \\Share1\Foo\Bar\s...
- Modified
- 19 Sep at 14:3
Cannot apply indexing with [] to an expression of type 'method group' SinglePageApp1. Get["/"] Nancy
I try to make a class with NancyModules and GET string on URL but method 'Get' tells that: > "Error CS0021 Cannot apply indexing with [] to an expression of type 'method group' ...." My Code:...
.NET Core console application, how to configure appSettings per environment?
I have a .NET Core 1.0.0 console application and two environments. I need to be able to use `appSettings.dev.json` and `appSettings.test.json` based on environment variables I set at run time. This se...
- Modified
- 19 Sep at 12:46
What does DateTimeStyles.RoundtripKind enumeration mean?
I was reading this answer [here](https://stackoverflow.com/questions/39508178/xml-delete-node-according-to-timestamp-c-sharp) where I came across this enumeration value `DateTimeStyles.RoundtripKind`....
- Modified
- 15 May at 22:35
xUnit theory test using generics
In xUnit I can have a `Theory` test that uses generics in this form: ``` [Theory] [MemberData(SomeScenario)] public void TestMethod<T>(T myType) { Assert.Equal(typeof(double), typeof(T)); } publ...
- Modified
- 23 May at 10:31
How to uninstall/upgrade Angular CLI?
When I try to create a new project with , with: ``` ng n app ``` I get this error: > fs.js:640 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^...
- Modified
- 3 Nov at 09:37
TypeNameHandling caution in Newtonsoft Json
On [this](http://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_TypeNameHandling.htm) link, in remarks section it's mentioned that: > `TypeNameHandling` should be used with caution when your app...
- Modified
- 28 Apr at 12:7
CsvHelper changing how dates and times are output
I am using [CsvHelper](https://joshclose.github.io/CsvHelper/) to write some CSV files and want to change the format of my dates and times to something specific. Following the advice from [https://st...
MS Sync Framework and SQL Server Compact
I develop a Windows C# application which can work in Online and Offline mode. When in Online mode it connects to a SQL Server. In Offline mode it connects to a local DB. I use the Microsoft Sync Fram...
- Modified
- 20 Sep at 20:54
ServicePointManager in ASP.NET Core
I'm trying to convert an existing class library code to a .NET Core class library. In that code in a `static` constructor I have the following: ``` ServicePointManager.DefaultConnectionLimit = 100; S...
- Modified
- 8 Sep at 08:9
TypeScript-'s Angular Framework Error - "There is no directive with exportAs set to ngForm"
I keep getting this error while using TypeScript's Angular2-forms framework: > `directive` Here's my code project dependencies : ``` "dependencies": { "@angular/common": "2.0.0-rc.6", "@an...
- Modified
- 13 Apr at 06:21
Cannot find module 'react'
I'm attempting to integrate React into an existing web page. At this time, I'm unable to get my React app loaded. My React app has two files. At this time, they look like this: ``` import React fro...
- Modified
- 18 Sep at 13:23
Sublime text 3. How to edit multiple lines?
I was using Notepad++ and now I want to use the same cool features in Sublime but I don't know how. I want to edit multiple lines at the same time like this: [](https://i.stack.imgur.com/o9rtC.png) ...
- Modified
- 22 Jan at 16:54