Development With A Dot

Blog on development in general, and specifically on .NET

Sponsors

My Friends

My Links

Permanent Posts

Portuguese Communities

Browse by Tags

All Tags » .NET (RSS)
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...
NHibernate Metadata
I know that O/RMs like NHibernate are supposed to shield us from the gory database internals such as tables, views, columns and such; however, at times, I do have the need to know how my domain model translates to the database. NHibernate, of course,...
Remove View State from UpdatePanel Call
You may not be aware that view state (and control state) is included on each UpdatePanel call, even if the controls placed inside it have it disabled. As view state can get quite large, it may be useful to disable posting it during UpdatePanel calls,...
Detecting Authentication Expiration in ASP.NET
I recently had to solve a problem: when issuing an asynchronous call by using an UpdatePanel , if the user is no longer authenticated – due possibly to long inactivity – this situation is silently ignored. What happens is, when an unauthenticated user...
Querying an Uninitialized Collection with NHibernate
I have talked before about the problem of accessing an uninitialized collection and presented a solution that allows us to see if the collection contains elements on the DB, and how many there are, without actually loading them. Now I have a general purpose...
NHibernate Pitfalls: SQL Queries and Parameter Prefix
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here . When you execute an SQL query with NHibernate with named parameters, you would perhaps expect them to be prefixed with a symbol specific to the current DB you...
Inline Image in ASP.NET
Inline images is a technique that, instead of referring to an external URL, includes all of the image’s content in the HTML itself, in the form of a Base64-encoded string. It avoids a second browser request, at the cost of making the HTML page slightly...
Posted: Nov 30 2011, 12:08 PM by Ricardo Peres | with no comments
Filed under: , ,
Checking if an Unloaded Collection Contains Elements with NHibernate
If you want to know if an unloaded collection in an entity contains elements, or count them, without actually loading them, you need to use a custom query; that is because the Count property (if the collection is not mapped with lazy=”extra” ) and the...
NHibernate Pitfalls: Lazy Entities and Virtual Members
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here . If you want to lazily load an entity as part of a many to one or one to one endpoint, you must declare it as lazy. This way, a proxy can be generated for it...
NHibernate Pitfalls: Fetch and Lazy
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here . When we use the fetch mode join for an association, we are implicitly using eager fetching, not lazy . Because the SELECT statement for the root entity already...
More Posts Next page »