Skip to main content

Posts

How to Modify With of Solution Configurations Window in Visual Studio

Select the Standard Toolbar options pulldown and select "Add or Remove Buttons" Select Customize On the Customise Dialog box, select the Commands tab Select the Solutions Configurations item, the one you want to change the width of Select "Modify Selection" Enter the new width, and select OK

Implementing Impersonation in C#

How to implement impersonation in an ASP.NET application https://support.microsoft.com/en-us/help/306158/how-to-implement-impersonation-in-an-asp-net-application ASP.Net Security Overview https://support.microsoft.com/en-us/help/306590/info-asp-net-security-overview

Starting an async task in C# 6 from Main

To start an async method from Main, do something like static int Main ( ) { return DoAsyncWork().GetAwaiter().GetResult(); } As of C# 7.1, can you also write static async Task< int > Main ( ) { // This could also be replaced with the body     // DoAsyncWork, including its await expressions:     return await DoAsyncWork(); } or the following if Main returns void static async Task Main ( ) { await SomeAsyncMethod(); }

POCO and Entity Framework

https://www.red-gate.com/simple-talk/dotnet/net-framework/using-entity-framework-with-an-existing-database-data-access/ https://www.red-gate.com/simple-talk/dotnet/net-framework/using-entity-framework-with-an-existing-database-data-access/