Entity Framework Pitfalls – Registering Custom Database Functions for LINQ
Like I said in my previous post, it’s not enough to add a DbFunctionAttribute attribute to a method to have it call a database function. If the function is not a built-in one, it will not be registered...
View ArticleASP.NET NHibernateDataSource
A long, long time ago, I wrote a NHibernateDataSource control. Back then, it was based in the first LINQ provider for NHibernate, and a long has happened since. Now, I decided to give it another go!...
View ArticleLoading ASP.NET MVC Controllers and Views From an Assembly
Back to MVC land! This time, I wanted to be able to load controllers and views from an assembly other than my application. I know about the extensibility mechanisms that ASP.NET and MVC give provides,...
View ArticleSpeech Recognition in ASP.NET
Speech synthesis and recognition were both introduced in .NET 3.0. They both live in System.Speech.dll. In the past, I already talked about speech synthesis in the context of ASP.NET Web Form...
View ArticleLesser-Known NHibernate Features: Serializable Values
If you want to store anything in a property of an entity, you can declare it as Object or dynamic; as long as you set it to a value of a serializable type, as supported by BinaryFormatter, you’re good!...
View ArticleLesser-Known NHibernate Features: Proxy Generation
Did you know that you can leverage NHibernate’s built-in proxy generator to inject custom behavior in your classes? It is called NHibernate.Proxy.DynamicProxy.ProxyFactory and there’s an interface,...
View ArticleNHibernate Pitfalls: HQL Queries With Joins
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here.Normally, in an HQL query, you can omit the select clause, that is, the two queries are identical: 1: var q1...
View ArticleLesser-Known NHibernate Features
Here I will list some of NHibernate’s hidden or not so well known gems.Mapping a Class to a QueryMixing Client and Server-Side Calls in ProjectionsEntity Mode MapFuture QueriesSerializable ValuesProxy...
View ArticleEntity Framework Pitfalls: Collections of Types Other Than ICollection Are...
If you expose in your entity a collection of a type other than ICollection<T> (or one inheriting from it, such as IList<T>) then it will be ignored. This is a bit absurd, because you might...
View ArticleThe SPDataSource Control
IntroductionSPDataSource, together with XsltListViewWebPart, DataFormWebPart and ContentByQueryWebPart, is one of the most powerful tools that SharePoint provides. Because it can be used in different...
View ArticleSharePoint References
I just updated my Excel I mentioned before with lots of hopefully useful SharePoint references:Fields (enumeration, display name, internal name, id, type, CLR type, resource, group, description,...
View ArticleBroadcasting Database Changes Through SignalR
There are several posts out there on using SignalR to signal changes in a database, but because I really didn’t quite like any of them, I decided to write my own.The possibility to detect changes in a...
View ArticleHTML Tags in XSLT Variables
Sometimes there is the need to show text inside HTML tags. For instance, in one occasion, I wanted to show just a portion of the contents in a Wiki field, but just the text. xsl:value-of will return...
View ArticleFiltering and Sorting SharePoint List Views
IntroductionHow do I filter thee? Let me count the ways!You should that SharePoint usually offers lots of ways to do more or less the same thing, and, of course, filtering a list view is no exception!...
View ArticleEntity Developer Review, Part 1
IntroductionI recently started to use Entity Developer, by Devart, to generate entities from my databases. It is a commercial product, mind you, and I am in no way affiliated with them, I just happen...
View ArticleMicrosoft Azure Development Cookbook Second Edition Review
IntroductionI recently had the opportunity to review Microsoft Azure Development Cookbook Second Edition, by Packt Publishing (@packtpub). I’m relatively new to development with Azure, and because it’s...
View ArticleEntity Developer Review, Part 2
Here’s my second post on Entity Developer, this time, focused on NHibernate. You can find the first part here.I created a new model item of type NHibernate and chose the option to generate from the...
View ArticleLesser-Known NHibernate Features: Validation and Lifecycle Interfaces
NHibernate offers two interfaces that can be used to validate an entity before it is saved or updated or to cancel its saving, updating and deleting: IValidatable and ILifecycle. They are an...
View ArticleEntity Developer Review, Part 3
Here is part 3 of my exploring Entity Developer series, this time, on Entity Framework. Read the first part here and the second here.So, this time I decided to use Entity Developer to generate a...
View ArticleEntity Framework Pitfalls: String Length Validation
If you want to validate the maximum number of characters that a string property can take, you might be lured into using MaxLengthAttribute. However, this won’t give you what you want: what this...
View Article