Click here to Skip to main content
15,892,480 members
Articles / NHibernate

Object Relational Mapping (ORM) using NHibernate - Part 7 of 8 Completing the Ecommerce Example

Rate me:
Please Sign up or sign in to vote.
5.00/5 (7 votes)
15 May 2013CPOL7 min read 28.1K   2.6K   17  
A full series of 8 part articles to show One-To-One, Many-To-One, Many-To-Many associations mapping using NHibernate, Using Collections With NHibernate, Inheritance Relationships Using NHibernate, Lazy Initializations/Fetches Using NHibernate.
��<!DOCTYPE html>

<!-- saved from url=(0014)about:internet -->

 <html xmlns:msxsl="urn:schemas-microsoft-com:xslt"><head><meta content="en-us" http-equiv="Content-Language" /><meta content="text/html; charset=utf-16" http-equiv="Content-Type" /><link type="text/css" rel="stylesheet" href="_UpgradeReport_Files\UpgradeReport.css" /><title _locID="ConversionReport0">

          Migration Report

        </title><script type="text/javascript" language="javascript"> 

          

            // Startup 

            // Hook up the the loaded event for the document/window, to linkify the document content

            var startupFunction = function() { linkifyElement("messages"); };

            

            if(window.attachEvent)

            {

              window.attachEvent('onload', startupFunction);

            }

            else if (window.addEventListener) 

            {

              window.addEventListener('load', startupFunction, false);

            }

            else 

            {

              document.addEventListener('load', startupFunction, false);

            } 

            

            // Toggles the visibility of table rows with the specified name 

            function toggleTableRowsByName(name)

            {

               var allRows = document.getElementsByTagName('tr');

               for (i=0; i < allRows.length; i++)

               {

                  var currentName = allRows[i].getAttribute('name');

                  if(!!currentName && currentName.indexOf(name) == 0)

                  {

                      var isVisible = allRows[i].style.display == ''; 

                      isVisible ? allRows[i].style.display = 'none' : allRows[i].style.display = '';

                  }

               }

            }

            

            function scrollToFirstVisibleRow(name) 

            {

               var allRows = document.getElementsByTagName('tr');

               for (i=0; i < allRows.length; i++)

               {

                  var currentName = allRows[i].getAttribute('name');

                  var isVisible = allRows[i].style.display == ''; 

                  if(!!currentName && currentName.indexOf(name) == 0 && isVisible)

                  {

                     allRows[i].scrollIntoView(true); 

                     return true; 

                  }

               }

               

               return false;

            }

            

            // Linkifies the specified text content, replaces candidate links with html links 

            function linkify(text)

            {

                 if(!text || 0 === text.length)

                 {

                     return text; 

                 }



                 // Find {DriveLetter}:\Something or \\{uncshare}\something strings and replace them with file:/// links

                 // It expects that a path ends in .extension, and that that extension does not have a space within it,

                 // it does this as not to greedily match in the case of "Text C:\foo\file.txt some other text" 

                 var filePath = /([A-z]\:|\\{2}[A-z].+)\\([^<]+)\.([^<\s]+)/gi;

                 

                 // Find http, https and ftp links and replace them with hyper links 

                 var urlLink = /(http|https|ftp)\:\/\/[a-zA-Z0-9\-\.]+(:[a-zA-Z0-9]*)?\/?([a-zA-Z0-9\-\._\?\,\/\\\+&%\$#\=~;\{\}])*/gi;

                 

                 return text.replace(filePath, '<a class="localLink" href="file:///$&">$&</a>')

                            .replace(urlLink, '<a href="$&">$&</a>') ;

            }

            

            // Linkifies the specified element by ID

            function linkifyElement(id)

            {

                var element = document.getElementById(id);

                if(!!element)

                {

                  element.innerHTML = linkify(element.innerHTML); 

                }

            }

            

            function ToggleMessageVisibility(projectName)

            {

              if(!projectName || 0 === projectName.length)

              {

                return; 

              }

              

              toggleTableRowsByName("MessageRowClass" + projectName);

              toggleTableRowsByName('MessageRowHeaderShow' + projectName);

              toggleTableRowsByName('MessageRowHeaderHide' + projectName); 

            }

            

            function ScrollToFirstVisibleMessage(projectName)

            {

              if(!projectName || 0 === projectName.length)

              {

                return; 

              }

              

              // First try the 'Show messages' row

              if(!scrollToFirstVisibleRow('MessageRowHeaderShow' + projectName))

              {

                // Failed to find a visible row for 'Show messages', try an actual message row 

                scrollToFirstVisibleRow('MessageRowClass' + projectName); 

              }

            }

           </script></head><body><h1 _locID="ConversionReport">

          Migration Report - </h1><div id="content"><h2 _locID="OverviewTitle">Overview</h2><div id="overview"><table><tr><th></th><th _locID="ProjectTableHeader">Project</th><th _locID="PathTableHeader">Path</th><th _locID="ErrorsTableHeader">Errors</th><th _locID="WarningsTableHeader">Warnings</th><th _locID="MessagesTableHeader">Messages</th></tr><tr><td><img width="16" height="16" src="_UpgradeReport_Files\UpgradeReport_Error.png" alt="Error" /></td><td><strong><a href="#ECommerceClient">ECommerceClient</a></strong></td><td>EShopClient\ECommerceClient.csproj</td><td class="textCentered"><a href="#ECommerceClientError">1</a></td><td class="textCentered"><a>0</a></td><td class="textCentered"><a href="#">0</a></td></tr><tr><td><img width="16" height="16" src="_UpgradeReport_Files\UpgradeReport_Error.png" alt="Error" /></td><td><strong><a href="#EShopSystem">EShopSystem</a></strong></td><td>EShopSystem\EShopSystem.csproj</td><td class="textCentered"><a href="#EShopSystemError">1</a></td><td class="textCentered"><a>0</a></td><td class="textCentered"><a href="#">0</a></td></tr><tr><td><img width="16" height="16" src="_UpgradeReport_Files\UpgradeReport_Success.png" alt="Success" /></td><td><strong><a href="#Solution">Solution</a></strong></td><td>ECommerceSystem.sln</td><td class="textCentered"><a>0</a></td><td class="textCentered"><a>0</a></td><td class="textCentered"><a href="#" onclick="ScrollToFirstVisibleMessage('Solution'); return false;">1</a></td></tr></table></div><h2 _locID="SolutionAndProjectsTitle">Solution and projects</h2><div id="messages"><a name="ECommerceClient" /><h3>ECommerceClient</h3><table><tr id="ECommerceClientHeaderRow"><th></th><th class="messageCell" _locID="MessageTableHeader">Message</th></tr><tr name="ErrorRowClassECommerceClient"><td><a name="ECommerceClientError" /><img width="16" height="16" src="_UpgradeReport_Files\UpgradeReport_Error.png" alt="Error" /></td><td class="messageCell"><strong>EShopClient\ECommerceClient.csproj:

        </strong><span>Unable to open project file to perform upgrade.  </span></td></tr></table><a name="EShopSystem" /><h3>EShopSystem</h3><table><tr id="EShopSystemHeaderRow"><th></th><th class="messageCell" _locID="MessageTableHeader">Message</th></tr><tr name="ErrorRowClassEShopSystem"><td><a name="EShopSystemError" /><img width="16" height="16" src="_UpgradeReport_Files\UpgradeReport_Error.png" alt="Error" /></td><td class="messageCell"><strong>EShopSystem\EShopSystem.csproj:

        </strong><span>Unable to open project file to perform upgrade.  </span></td></tr></table><a name="Solution" /><h3>Solution</h3><table><tr id="SolutionHeaderRow"><th></th><th class="messageCell" _locID="MessageTableHeader">Message</th></tr><tr name="MessageRowHeaderShowSolution"><td><img width="16" height="16" src="_UpgradeReport_Files\UpgradeReport_Information.png" /></td><td class="messageCell"><a _locID="ShowAdditionalMessages" href="#" name="SolutionMessage" onclick="ToggleMessageVisibility('Solution'); return false;">

          Show 1 additional messages

        </a></td></tr><tr name="MessageRowClassSolution" style="display: none"><td><a name="SolutionMessage" /><img width="16" height="16" src="_UpgradeReport_Files\UpgradeReport_Information.png" alt="Message" /></td><td class="messageCell"><strong>ECommerceSystem.sln:

        </strong><span>The solution file does not require conversion.</span></td></tr><tr style="display: none" name="MessageRowHeaderHideSolution"><td><img width="16" height="16" src="_UpgradeReport_Files\UpgradeReport_Information.png" /></td><td class="messageCell"><a _locID="HideAdditionalMessages" href="#" name="SolutionMessage" onclick="ToggleMessageVisibility('Solution'); return false;">

          Hide 1 additional messages

        </a></td></tr></table></div></div></body></html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India
Software Developer developing in c#.net.

Comments and Discussions