Contents tagged with ASP.NET
I was creating a generic repository (yes I'm still using that old pattern) with EntityFramework and I wanted to eager load child collections. One way to do this is to create different repository … more
I was writing some tests today and had a need to use an embedded resource as I did not want to have huge strings inside my test methods. The embedded resource file is compiled along with the … more
Another question that gets asked during interviews is "What is the difference between a static class and a singleton?" or "When would you use a static class vs a singleton?".
The … more
In Visual Studio 2012, C# code inside MVC views does not get compiled in the normal build process. This can lead to runtime bugs... yucky!
Thankfully, you can force Visual Studio to … more
Interviewers still like to ask this question so I'm going to go over it.
Web Forms Page Load Events
PreInit - Here you can check if the page is a post back, but … more
If you want to combine one or more Tasks into one Task and wait for all of them to complete you can use a ASP.NET 4.5 feature called WhenAll. WhenAll takes a collection of tasks and returns one … more
I was asked this question at a job interview recently. ABCs? Huh? I was slightly confused. Well... I said there's the endpoints and bindings. And of course the … more