Contents tagged with .NET 4
-
My All Time Favorite Posts
Since this blog started, back in 2008, I wrote a lot of posts. I’d say some are still up to date. I picked a few of them, those I’m more proud of, in no particular order.
-
NHibernate Pitfalls: Sets and Hash Codes
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here.
-
Loading Entities Dynamically with Entity Framework
Sometimes we may be faced with the need to load entities dynamically, that is, knowing their Type and the value(s) for the property(ies) representing the primary key.
-
ASP.NET Web Forms Extensibility: Providers
Updated on August 28th to add the Virtual Path provider. Thanks, Matthew Schaad!
-
Vote of Disconfidence to Entity Framework
A friend of mine has found the following problem with Entity Framework 4:
-
Entity Framework Code First: Get Entities From Local Cache or the Database
Entity Framework Code First makes it very easy to access local (first level) cache: you just access the DbSet<T>.Local property. This way, no query is sent to the database, only performed in already loaded entities.
-
General Purpose Data Annotations Validation Attribute
The Data Annotations framework, introduced in .NET 3.5, and enhanced in .NET 4.0, is likely becoming the basis for attribute-based validation in .NET. I like about it the fact that it is extensible and that it can be (and indeed it is) used in a lot of scenarios, from Silverlight to ASP.NET MVC and Dynamic Data.
-
Changing a Control’s Output Dynamically
A question that pops up occasionally in ASP.NET forums or sites like Stack Overflow is how to change a control’s output dynamically. Well, since the CSS Friendly Control Adapters came out, I knew how to do it statically, through static registration on a .browser file (it can also be done dynamically, for all controls of a certain type, by adding a fully qualified type name to HttpContext.Current.Request.Browsers.Adapters collection), but I decided to go and try to do it dynamically, without registration. More specifically, I wanted to achieve two things:
-
Workshop Novidades ASP.NET 4.0
No próximo dia 8 de Outubro irei dar um pequeno workshop, de 3 horas, nas instalações da Flag, em Coimbra:
-
Adding Modules Dynamically to ASP.NET
As you may already know, ASP.NET 4.0 brought along with it a new mechanism to execute methods before the application start event (the Application_Start method): the PreApplicationStartMethodAttribute. This attribute, when applied to an assembly, indicates a method which is to be run before the application starts. If your web application references any assembly which has this attribute, it will run the method it declares, throwing an exception it if is not found.