Comparing Guid with string

I'm surprised that I couldn't find an answer to this either in Google or here on SO, but what is the best way to compare a `string` to `Guid` taking into consideration case, and, if appropriate, perfo...

27 Jun at 22:10

Browser Link: Failed to invoke return value callback: TypeError: Cannot read property 'files' of null

## Background: Using `Visual Studio 2015`, `ASP.NET Core 1.0` I have created `Web Application` project. When I run application and go to `Chrome Console` I have following error: > Browser Link: F...

Is it possible to send Toast notification from console application?

Is it possible to send Toast notifications from console application using ? I know that it is possible to send Toast notifications from Windows Universal app: ``` var toast = new ToastNotification(...

How to use CSI.exe script argument

When you run csi.exe /? (with Visual Studio 2015 update 2 installed), you will get the following syntax ``` Microsoft (R) Visual C# Interactive Compiler version 1.2.0.51106 Copyright (C) Microsoft Co...

27 Jun at 18:32

Is there a way to reference const parameters in C# block comments?

In the c# block comments, I want to say that the default value for a particular parameter is a class const property. Is there a way to reference that parameter directly? I'd like to either display t...

23 May at 12:32

how to order by a dynamic column name in EntityFramework?

I am trying to get following code working , This was working fine for MSSQL , but since i changed to use mySql it is not working ``` records.Content = db.areas .Where(x => ...

Property or indexer cannot be assigned to "--" it is read only

So I'm trying to pass a local string to another form in a c# project. This is my code: Form 1: ``` ... Main frm = new Main(); frm.Passvalue = usrTxt.Text; frm.ShowDialog(); ``` Form 2 ``` ... pub...

27 Jun at 13:5

c# method override in Unity3d

In the latest weeks I played with Unity3d using c# as scripting language. I never used before c# nor Unity3d, and I'm trying to understand how methods overriding works in Unity framework. What wonders...

27 Jun at 07:59

How to add link parameter to asp tag helpers in ASP.NET Core MVC

I have a lot of experience with . Now I learn and have to pass a parameter to link in page. For example I have the following ``` [HttpGet] public ActionResult GetProduct(string id) { ViewBa...

Entity Framework Core Eager Loading Then Include on a collection

I have three Models that I want to include when performing a query. Here is the scenario. ``` public class Sale { public int Id { get; set; } public List<SaleNote> SaleNotes { get; set; ...

Change the name of headers in CSV file using CSVHelper in C#

I am using CSV Helper library to produce CSV files for the user to to populate and upload into the system. My issue is that the WriteHeader method just writes the attributes of a class with names like...

7 May at 02:15

Generate Unique Hash code based on String

I have the following two strings: ``` var string1 = "MHH2016-05-20MASTECH HOLDINGS, INC. Financialshttp://finance.yahoo.com/q/is?s=mhhEDGAR Online FinancialsHeadlines"; var string2 = "CVEO2016-06-22C...

6 May at 06:49

ServiceStack.Aws support "last evaluated key" on DynamoDB?

In DynamoDB, when limit property has been set up, DynamoDB will return a "last evaluated key" that is used for pagination (see [here](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Qu...

What is a circular dependency and how can I solve it?

## Scenario --- I have a solution on which I have (more than) 2 projects. The first project has a project reference to the second project. The second project doesn't have a reference to the f...

C# Task returning method in using block

In when an `Task` or `Task<T>` method is returned from within a `using` statement is there any risk of the cleanup not properly occurring, or is this a poor practice? What concerns are there as it pe...

Conditional compilation symbol for a .NET Core class library

I have created a .NET Core R2 class library and have some common code that I use for several different platforms. Some of the code is not valid in the .NET Core platform and so I wish to wrap it arou...

UWP, XAML - making CheckBox empty

How can I make CheckBox empty? I only need the tick. Now it takes additional empty space, like here: [](https://i.stack.imgur.com/AXUqQ.png) ``` <CheckBox Background="Aqua" Margin="0,0,0,0"/> ``` ...

Prevent visual studio from limiting the setter method to internal

Well, I use visual studio 2015 CE, update 2. One productivity hack I usually do is that I create empty model classes like: ``` public class PersonModel { } ``` and then use them in a select express...

ServiceStack.Redis: Query a subset of objects by object properties stored using redisClient.StoreAll()

I have list of POCO objects (~80k). I have tried different ways to store these objects in Redis. Refer to redisClient.StoreAll() at [http://docs.servicestack.net/redis-client/redis-client](http://doc...

26 Jun at 03:36

ASP.NET Core RC2 Seed Database

My problem is i am trying to seed an Entity Framework Core database with data and in my mind the below code show work. I've realised that this should not be called in the `ApplicationDbContext` constr...

Mapping foreign key to non primary surrogate key column in EF code first

``` public class A { [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public virtual int Aid { get; set; } public virtual ICollection<B> B { get; set; } } public cla...

What is the difference between Authorize Action filter and Authorization filter?

As per the [ASP.NET website](http://www.asp.net/mvc/overview/older-versions-1/controllers-and-routing/understanding-action-filters-cs) The ASP.NET MVC framework includes several action filters: 1. ...

25 Jun at 13:35

Best practice for error handling with ASP.NET Web API

Could you clarify what is the best practice with Web API error management. Actually, I don't know if it is a good practice to use try catch into my Api request. ``` public Vb.Order PostOrderItem(Vb.O...

13 Jan at 16:55

ServiceStack in Xamarin

I'm having a werid issue with the recent updates. I'm Using Visual Studio Enterprise 2015 and XF 2.3 I'm using Service Stack, and everything works cool but here's when the story goes werid. I have a...

Navigating through dynamic Object (json) in C#

i'm getting a json from a HTTP GET request that looks like after parsing it with "NewtonSoft.Json": Where responseString is : As you see, the name changes everytime, and i was wondering how do I navig...

17 Jul at 08:45