21.11. Creating a Console UI–Based Front End

Create a new Console Application named AutoLotCUIClient. After you create your new project, be sure to add a reference to your AutoLotDAL.dll assembly, as well as System.Configuration.dll. Next, add the following using statements to your C# code file:

using AutoLotConnectedLayer;
using System.Configuration;
using System.Data;

Now insert a new App.config file into your project that contains a <connectionStrings> element, which you will use to connect to your instance of the AutoLot database, as in this example:

<configuration>
  <connectionStrings>
    <add name ="AutoLotSqlProvider" connectionString =
    "Data Source=(local)\SQLEXPRESS;
     Integrated Security=SSPI;Initial Catalog=AutoLot"/>
</connectionStrings> ...

Get Pro C# 2010 and the .NET 4 Platform, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.