Blogger Widgets
  • Sharing Photos using SignalR
  • TFS Extenstion - allows copy work items between projects
  • Displaying jquery progressbar with ajax call on a modal dialog
  • Managing windows services of a server via a website
  • Exploring technologies available to date. TechCipher is one place that any professional would like to visit, either to get an overview or to have better understanding.
  • SignalR

    Sharing Photos using SignalR

Search This Blog

Friday, 26 April 2013

Set deadlock priority with NHibernate

Sometimes you would want to explicitly set dead lock priority as part of a transaction which is not possible if you are using NHibernate as of now. In such cases you can define a custom Interceptor which does the trick. Here is a small snippet of code that can help you achieve that: public class DeadLockPriorityInterceptor : EmptyInterceptor { private ISession session; private string priority; public DeadLockPriorityInterceptor(string...

Wednesday, 24 April 2013

CompositeId() throws exception - Could not compile the mapping document: (XmlDocument)

After defining a map for composite key CompositeId() .KeyProperty(x => x.title) .KeyProperty(x => x.label); The following exception is raised when trying to create a composite key CreateSessionFactory() - Inner exception: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail. .. CreateSessionFactory()...

Saturday, 13 April 2013

The conversion of a varchar data type to a datetime data type resulted in an out-of-range value

Have encountered with an sql error after running following sql: INSERT INTO [Member](FirstName, LastName, CreationDate, LastActivityDate) VALUES ('Saif', 'Ikram' , '13/04/2013 22:15:44', '01/01/1753 00:00:00') go "The conversion of a varchar data type to a datetime data type resulted in an out-of-range value". Actually there is nothing wrong with sql. Now run following sql to see if this works set language british go INSERT...

Thursday, 4 April 2013

Consuming return value from stored procedure using NHibernate without mapping

After haggling around I have found a solution that works. First I have created a stored procedure as follows: CREATE PROCEDURE GETTOTALINCOME AS DECLARE @TOTALINCOMECOUNT MONEY; BEGIN SELECT @TOTALINCOMECOUNT = SUM(INVAMOUNT) FROM INVOICE RETURN @TOTALINCOMECOUNT; END; This is a simple stored procedure that just returns a value. Now lets look at NHibernate code block that can execute the stored procedure and...
Copyright © 2013 Template Doctor . Designed by Malith Madushanka - Cool Blogger Tutorials | Code by CBT | Images by by HQ Wallpapers