Archives
-
ASP.NET Formatted String Control
Back to ASP.NET Web Forms land! SharePoint includes a handy control, FormattedString, that can be used to render the contents of its child controls as specified in a format string; pretty much what String.Format does. I wanted to do the same with plain old ASP.NET Web Forms, and here’s what I came up with:
-
Porto Tech Hub 2015 – Wrap Up
Porto Tech Hub is over… for now! I was interesting, I got the chance to listen to some good presentations, learn a bit, and see old friends. I really liked the presentations by my former colleagues @ CRITICAL Software, Norberto Leite (@nleite), from MongoDB and Rui Ferreira, from Facebook, and, of course, the one from my friend and colleague João Esteves, which you can grab from the event’s site.
-
Porto Tech Hub 2015
-
Free Training Materials for Development
A random list that will grow, eventually, with time.
-
Packt Publishing Free Learning Library
-
Entity Framework Multitenancy Part 2 – Conventions
In my last post, I talked about different scenarios for achieving multitenancy with Entity Framework contexts. This time, I am going to show how to use conventions, wrapping the code I provided then.
-
Entity Framework Multitenancy
Update: see part two here
-
Lesser-Known NHibernate Features: Calculated Properties
With NHibernate you can have entity properties that are the result of a SQL expression (unlike other O/RMs). It is also possible to add arbitrary SQL restrictions to collections of an entity.
-
Lesser-Known NHibernate Features: Filters
Unlike other OR/Ms – which, as always, shall remain unnamed – NHibernate offers a couple of ways to automatic filter results. Basically, we have two options:
-
Defining ASP.NET Update Panel Template Contents Dynamically
The ASP.NET UpdatePanel was introduced with the ASP.NET 2.0 AJAX Extensions almost a century ago (kidding, but almost feels like it!). It allows us to have AJAX-style effects (partial page loads) with very little effort.
-
Lesser-Known NHibernate Features: Mapping By Convention
Did you know that NHibernate, like other O/RMs out there, allows you to map classes by convention? Yes, it’s true… Let me show you how!
-
Adding Custom Validation Messages in Silverlight
Sometimes it is useful to add our own validation messages to a Silverlight control, normally because we are doing custom validation through code, not through the reguar IDataErrorInfo, INotifyDataErrorInfo or ValidationAttributes. This is not straightforward, but it is possible. An example might be:
-
Silverlight Transform Markup Extension
Did you ever have one of those situations where you need to apply a data source to a control, but also convert the each of the data source elements?<ComboBox ItemsSource="{Binding ItemsSource, ElementName=MyDataSource}, Converter={StaticResource MyConverter}}" Width="100" Height="30"/><ComboBox ItemsSource="{Binding ItemsSource, ElementName=MyDataSource}, Converter={StaticResource MyConverter}}" Width="100" Height="30"/>
Normally we set the data source to the DataContext or ItemsSource property and add an item template where we specify the converter, but sometimes this can’t be done this way, for one reason or the other. So, I worked out a simple solution: the TransformedItemSource! What it does is, it allows us to specify a converter for each of the source values in the data source collection, not the data source as a whole.
-
Comunidades Portuguesas de Desenvolvimento
(This post is in Portuguese only)
-
Lesser-Known NHibernate Features: LINQ Extensions
With NHibernate, you are not bound by the out-of-the box methods that LINQ provides, and their default translations to SQL. I already mentioned that you can add your own extension methods, with minimum work:
-
Day Against DRM 2015 Campaign
For those who don't know, today is the International Day Against DRM!
-
Silverlight Method Data Source Markup Extension
A quick way to obtain a data source from a method through a markup extension, without any code:
-
Lesser-Known NHibernate Features: Serializing Configuration
This isn't exactly a feature of NHibernate, but it is something that you can do with it and most people isn't aware of.
-
Silverlight Resource Markup Extension
In case you want to use resources in your Silverlight applications, you have a couple of options. My favorite, however, is using a markup extension and RESX resource files. With this approach, you can have code such as:
-
SharePoint Filter Web Part
SharePoint includes a couple of useful web parts that can be used to filter other web parts. The problem is, they are only available in the Enterprise edition. It is easy, however, to build our own filters.