TipsOnLips.net

Your .net tips and tricks source

About the author

Author Name is someone.
E-mail me Send mail

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010


Unexpected row count: 0; expected: 1, NHibernate

Error: NHibernate.StaleStateException: NHibernate.StaleStateException: Unexpected row count: 0; expected: 1.

Usually when you get this error, may be check the session.Insert or session.InsertOrUpdate methods, as if a domain object which being saved had an assigned identifier, then InsertOrUpdate would throw this error.


Categories: NHibernate
Posted by developer on Friday, November 28, 2008 9:49 AM
Permalink | Comments (0) | Post RSSRSS comment feed

C# || and && operators

|| Operator

x || Y (if x is true, y is not evaluated (because the result of the OR operation is true no matter what the value of y might be). This is known as "short-circuit" evaluation).

In other words, if x is false, then evalute y.

&& Operator

x && y (if x is false, y is not evaluated (because the result of the AND operation is false no matter what the value of y may be). This is known as "short-circuit" evaluation).

In other words, if x is true, then evalute y.


Categories: C#
Posted by developer on Thursday, November 27, 2008 2:50 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Microsoft Remote Display for mobile devices download

This utility allows to manage and control you mobile device (windows mobile 2003 and 5) from your desktop.

1) Download the Microsoft ActiveSync, click here.

2) Download the Remote Display utility by Powertoys from here.

 Have fun.


Categories: Windows Mobile
Posted by developer on Saturday, November 15, 2008 2:17 AM
Permalink | Comments (0) | Post RSSRSS comment feed

Track Active Items in Solution Explorer / Visual Studio

In Visual Studio, most of the time we need to keep track of the classes or forms you are navigating through and we need them to be highlighted in the Solution Explorer.

This option could be switched off sometimes, therefore the picture below shows you how to switch this option on again.

Therefore, to track the Active Items just tick on the 'Track Active Item In Solution Explorer' checkbox and click OK.

 


Posted by developer on Thursday, November 13, 2008 2:46 AM
Permalink | Comments (0) | Post RSSRSS comment feed