public DashboardResult(UserDashboard userDashboard, List<Widget> availableWidgets)
		{
			this.DashboardId = userDashboard.Id;
			this.Username = userDashboard.Username;
			this.Layout = userDashboard.Layout;

			this.Widgets = new List<WidgetResult>();

			//this is a little weird, and is the reason why we have this DashboardResult class
			//we are returning ALL available widgets for the user and marking them as selected or not
			//the knockout view model in our javascript uses this to bind to the UI

			foreach (Widget widget in availableWidgets)
			{
				var usedWidget = (from uw in userDashboard.SelectedWidgets
								 where uw.Widget.Id == widget.Id
								 select uw).FirstOrDefault();

				if (usedWidget != null)
					this.Widgets.Add(new WidgetResult(widget, usedWidget));
				else
					this.Widgets.Add(new WidgetResult(widget));
			}

			//sort on the column order
			this.Widgets.Sort(delegate(WidgetResult w1, WidgetResult w2)
								{
									return w1.ColumnOrder.CompareTo(w2.ColumnOrder);
								});
		}		
		protected UserDashboard GetDefaultDashboard(DashboardContext ctx)
		{			
			//user didn't have a dashboard
			//return the default settings and default selected widgets
			UserDashboard defaultDashboard = new UserDashboard();

			defaultDashboard.Id = 0;

			//use anonymous, we won't save this to the db
			defaultDashboard.Username = "******";
							
			defaultDashboard.Layout = "layout2";

			var defaultWidgets = from w in ctx.Widgets
									where w.DefaultSelection == true
									select w;

			foreach (Widget widget in defaultWidgets)
			{
				DashboardWidget myWidget = new DashboardWidget(widget);
				defaultDashboard.SelectedWidgets.Add(myWidget);
			}

			return defaultDashboard;			
		}