This project is read-only.

Issue On Decoupling DataSets From WinForms FE Project

Apr 12, 2009 at 7:07 PM

Issue on decoupling DataSets from WinForms FE project
(DataSets from referenced classlib can't be used for RAD design of WinForms?)

1. Create new project Northwind.NET.FE.Datasets

2. Set reference to new Northwind.NET.FE.Datasets from
        Northwind.NET.FE project

3. Create setting in Northwind.NET.FE.Datasets

NorthwindNETConnectionString =
  Data Source=HAMBURG\SQL2005;Initial Catalog=NorthwindNET;Integrated Security=True

4. Create wrapper class Northwind_NET_FE_Properties

namespace Northwind.NET.FE.Properties
{
    internal sealed partial class Settings
    {
        public static Northwind.NET.FE.Datasets.Properties.Settings Default
        {
            get
            {
                return Northwind.NET.FE.Datasets.Properties.Settings.Default;
            }
        }
    }
}

6. Move all items from Datasets folder to
     Northwind.NET.FE.Datasets project

7. Remove settings NorthwindNETConnectionString from Northwind.NET.FE

8. Compile, build, run - it works OK but... - see the following Side-effect/Issue

-----------------------------------------------------------------------------------
Side-effect/Issue: Northwind.NET.FE will not have any datasets in its "Data Sources" window IOW designing WinForms RAD way by using "drag&drop" of items from "Data Sources" window will be now unavailable in Northwind.NET.FE...
-----------------------------------------------------------------------------------