public void AddLinkTest()
 {
     // int AddLink(int moduleId, int itemId, String userName, String title, String url, String mobileUrl,
     //        int viewOrder, String description)
     DesktopModulesFacade facade = new DesktopModulesFacade();
     PortalLink link=new PortalLink();
     link.ModuleID = 0;
     link.ItemID = 0;
     link.CreatedByUser = "******";
     link.Title = "t";
     link.Url = "url";
     link.MobileUrl = "murl";
     link.ViewOrder = 0;
     link.Description = "d";
     facade.AddLink(link);
 }
        public int AddLink(PortalLink link)
        {
            // TODO: add access security here..
            // TODO: add argument validation here..

            int retval;
            // Run within the context of a database transaction.
            // The Decorator Design Pattern.
            using (TransactionDecorator transaction = new TransactionDecorator())
            {
                retval =
                    linkDAO.AddLink(link.ModuleID, link.ItemID, link.CreatedByUser, link.Title, link.Url, link.MobileUrl,
                                    link.ViewOrder.Value, link.Description);
                transaction.Complete();
            }
            return retval;
        }