(Richard Carr) .NET assemblies can be given three distinct version numbers, each serving a different purpose. It can be useful to obtain these version numbers at run-time. This is made possible with reflection and the use of the FileVersionInfo class.
Tag: Development
A Troubleshooting Guide for Entity Framework Connections & Migrations
(K. Scott Allen) The Entity Framework DbContext class uses a convention over configuration approach to development. When everything is working correctly, you can generate and populate a database just by writing a little bit of code and running “enable-migrations” and “update-database” from the Packa
How to OutputCache an object based on the current date with VaryByCustom and GetVaryByCustomString
(Jon Gallant) I have a long running script that needs to run once a day and I’d like to store the results of that script in cache for the rest of the day so only one user (or any automated http request) will incur the delay.
Using Dynamic Data with Entity Framework DbContext
(pranav rastogi) In Visual Studio 2012, if you create a ADO.NET Data Model then the generated Context class derives from a type called DbContext instead of ObjectContext. DbContext is also used when you are using EntityFramework Code First
The New Read-Only Collections in .NET 4.5
(Eric Vogel) The Microsoft .NET Framework 4.5 includes the IReadOnlyList, IReadOnlyDictionary and IReadOnlyCollection generic interfaces. The main benefit is that the new interfaces are covariant, except for IReadOnlyDictionary. This means that you can use a derived type as the generic parameter, wh
Introduction to Portable Class Library in .NET Framework 4.5
(V.N.S Arun) Portable Class Library, otherwise called PCL, comes with .NET framework 4.5 RC and a separate project template is available on Visual Studio 2012 RC. The portable class library can also be installed on top of Visual Studio 2010.
ASP.NET Dynamic Data Unleashed: Field Templates
(Oleg Sych and Randy Patterson) Enterprise applications deal with employees, managers, emergency contacts, prospects, customers, suppliers, and vendors—in other words, people and organizations, who all have names, addresses, and phone numbers.
Tiny Happy Features #3 – Publishing Improvements, chained Config Transforms and Deploying ASP.NET Apps from the Command Line
(Scott Hanselman) At some point soon lots of people are going to start writing these epic blog posts about Visual Studio 2012. They will include LOTS of screenshots (some good and some bad), some small code samples and minimal context.
Invoking Methods Using Reflection
(Richard Carr) The twentieth part of the Reflection tutorial describes the use of reflection to invoke methods of object instances. This allows late bound objects to be activated and used without needing to know the actual type or an interface that it implements.
Binding form data in ASP.NET Web API
(Pablo M. Cibraro) One scenario that is very common in ASP.NET MVC is to bind form data (data posted with the media type application/x-www-form-urlencoded) to individual parameters or a form collection in a controller action. However, that scenario does not work quite the same in ASP.NET Web API as
