There are a few steps you need to config

1. Add ConnectionStringKeyName and ConnectionString in machine.config, web.config, or app.config like this
<appSettings>
        <remove key="ConnectionStringKeyName"/>
        <add key="ConnectionStringKeyName" value="DevDB"/>
</appSettings>
<connectionStrings>
        <remove name="DevDB"/>
        <add name="DevDB" connectionString="Data Source=localhost;Initial Catalog=demo;User Id=sa;Password=Pa$$w0rd;Connect Timeout=15;Pooling = true;Min Pool Size=10;Max Pool Size=100" providerName="System.Data.SqlClient"/>
</connectionStrings>

2. Map your own business model class to Store Procedure in XML(refer to sample code under EasyMappping1.0beta.src)

2.1 The XML Schema is located at EasyMapping1.0Beta.bin(under ModelConfiguration folder)

2.2 Run your own Store procedure Script base on your own model

3. Define your own business model class in code

3.1 Use PersistableProperty attribute to define the mapping between class property and Store procedure return result Column

Caution:

  • Make sure the XML file name(exclude .xml) is the same as business model class name
  • Make sure the XML file is under ModelConfiguration folder of root of project
  • Make sure set the XML file 's property "copy always" in project


4. Config log4Net with file "log4net.xml"(refer to sample code under EasyMappping1.0beta.src)

4.1 Make sure set the XML file 's property "copy always" in project

4.2 Make sure log4net.xml is under root of project

Last edited Dec 12, 2010 at 12:06 PM by haperkelu, version 7

Comments

No comments yet.