How to print in UWP app?
I am trying to print out something from my UWP app. Basically I've used a WebViewBrush to draw some data on to some `FrameworkElement`'s (Windows.UI.Xaml.Shapes.Rectangle) - and I want to print one of...
- Modified
- 22 Aug at 08:31
modify existing where condition in sql expression
Given this Sql Expression as an parameter: (assume there's no way to modify how this input parameter is generated) ``` Db.From<Contact>().Where(C => C.Email != null).Or(C => C.Reference != null); ``...
- Modified
- 22 Aug at 09:0
Prevent loading symbols in VisualStudio
I am using Visual Studio 2015. I want to prevent symbols loading for all the core dlls like System.Net, System.Web etc..., I just want to load symbols only for the dlls which are in my solution. I h...
- Modified
- 22 Aug at 09:21
Dependency injection resolving by name
How can I inject different implementation of object for a specific class? For example, in Unity, I can define two implementations of `IRepository` ``` container.RegisterType<IRepository, TestSuiteRepo...
- Modified
- 12 Nov at 01:7
how to return tuple of primitive data types in dapper
I have been using dapper for one of my projects and in one case I wanted to return a tuple of primitive data types. (only a single row) Since I used dapper, I really would like to use dapper for this ...
rabbitmq connection best practices do we maintain persistent connection in the publisher
Generally, the best practices for SQL connection is to open the connection, execute the query and dispose the connection. However, what is the recommended practice for AMQP based queue servers like Ra...
- Modified
- 22 Aug at 04:37
Use ServiceStack Typescript client for non-servicestack server
I've been using ServiceStack since v3 but been dragged away from C# for a while now, digging into node, and typescript recently as a middle ground :) So now I've got this project where I need to cons...
- Modified
- 22 Aug at 00:8
How can I add a mapping in AutoMapper after Initialize has been called?
I have a couple of ASP.Net apps that share mapping code, so I've created a generic automapper init class. However, in one of my apps, I have some specific classes that I want added to the configuratio...
- Modified
- 7 May at 06:3
Encog C# RBF network, how to start?
I went through whole documantation and didnt find how to set RBF network. I found some RBF example in ConsoleExmpales/Examples/Radial, but it looks like it doesnt work anymore, beceause some methods h...
- Modified
- 21 Aug at 22:56
'UTF8' is not a supported encoding name
So I'm just playing around with Spotify's Web API and I'm trying to access my top played tracks. Although I've encountered a problem I've been trying to solve for a couple of hours now but I can't fin...
Why doesn't WCF/JSON return `null` for a null return value?
According to the [JSON spec](http://www.json.org/), the correct way to represent a null value is the literal `null`. If that is the case, why does WCF return an empty response instead of `null`? Is t...
Enable asp.net core request validation
Am I missing something or asp.net core allows to post script tag in user text fields? In Previous versions of asp.net mvc I needed to allow it by [AllowHtml] attribute. Is there a way how enable vali...
- Modified
- 21 Aug at 10:48
Validate Google Id Token
I'm using ASP.NET Core to serve an API to an Android client. Android signs in as a Google account and passes a JWT, the ID Token, to API as a bearer token. I have the app working, it does pass the a...
- Modified
- 23 Feb at 11:37
How to set command timeout in aspnetcore/entityframeworkcore
The place where the command timeout is set is no longer the same as earlier versions. However, I cannot find anywhere that says how to change this. What I am doing is uploading very large files whic...
- Modified
- 24 Jul at 06:23
How to get the database context in a controller
I am trying all day to figure out to get the `ApplicationDbContext` in the `ManageController.cs` of a default MVC 6 project. I went online and Googled a lot but no one seems to have the same problem ...
- Modified
- 20 Aug at 15:32
Bearer was forbidden with Authorize filter in IdentityServer4
While testing [IdentityServer4][1] with [AspNetAuthorization ](https://github.com/blowdart/AspNetAuthorizationWorkshop) tutorial I added the a simple `[Authorize(Roles = "Administrator")]` and since t...
- Modified
- 6 May at 10:40
.NET Standard, .NET Core, PCL
.NET Standard has been a confusing concept. The idea of a standard .NET library format sounds great. But, it's not clear what it is exactly. There are now .NET Core, and .NET Standard Class Library pr...
Can you return an HTTP response from an AuthorizeAttribute without throwing an exception?
I'm using an AuthorizeAttribute on various controllers which may need to return 403 or 429 (too many requests) based on certain attributes of the request itself. I implemented it entirely within a cus...
- Modified
- 20 Aug at 07:52
Application startup code in ASP.NET Core
Reading over the [documentation for ASP.NET Core](https://docs.asp.net/en/latest/fundamentals/startup.html), there are two methods singled out for Startup: Configure and ConfigureServices. Neither o...
- Modified
- 23 Aug at 19:48
Isn't DTO pattern ONLY useful when you combine it with some caching or MVVM?
This question is not to argue with the design but to understand how can this design pattern be fully leveraged. Now, just to summarize, my takeaway from ServiceStack's design docs was that using , alo...
- Modified
- 29 Aug at 08:7
Programmatically reset VisualStudio shortcuts
There are two related questions about [resetting VisualStudio keyboard scheme](https://stackoverflow.com/questions/5120537/how-can-i-create-a-visual-studio-macro-to-change-the-keyboard-layout) and [im...
- Modified
- 23 May at 12:9
ASP.NET MVC How to use an object in rdlc report
I'm using VS Community and a MVC project with Entity Framework. I use code first migration for data modeling. I already have reports using a view for each one. Each view uses a C# model for show repor...
- Modified
- 4 Jun at 03:46
In VS2015, how do I disable Step Into for auto-implemented properties?
I've just started using Visual Studio 2015 and found that it behaves differently to VS2012/VS2013 when debugging auto-implemented properties. Say I have a property defined in a class: ``` public int...
- Modified
- 19 Aug at 14:10
What are the different approaches to Object-Object mapping in .NET?
I'm needing to do some mapping between objects (e.g. PersonModel to PersonViewModel) and am researching on the different approaches to do this. Specifically I'm working with Entity Framework and tryin...
- Modified
- 23 May at 10:33
Record and Table locking in C# WinForms with PostgreSql and ADO.NET
I am using.NET Framework 4.6.1, WinForms, PostgreSQL 6.4beta4 and Npgsql and ADO.NET. My current application is a multi-user-application where all users connect to the same database. Data gets bound...
- Modified
- 23 May at 12:3