O'Reilly logo

Pro C# 2010 and the .NET 4 Platform, Fifth Edition by Andrew Troelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required