This project is read-only.
Project Description
The easy way for mapping of entities in sql.


<?xml version="1.0" encoding="utf-8" ?>

        <changeStatement id="create" parameterMap="insertParamMap">
                INSERT INTO Persons ( FirstName, LastName, Age ) VALUES ( @firstname, @lastname, @age )
        <selectStatement id="all" resultMap="personResultMap">
                SELECT PersonId, FirstName, LastName, Age FROM Persons 
        <storeProcedure id="createPerson" name="sp_CreatePerson" parameterMap="insertParamMap" />
        <resultMap id="personResultMap">
                <field property="Id" column="PersonId" />
                <field property="FirstName" column="FirstName" />
                <field property="LastName" column="LastName" />
                <field property="Age" column="Age" />
        <parameterMap id="insertParamMap">
                <param name="firstname" property="FirstName" />
                <param name="lastname" property="LastName" />
                <param name="age" property="Age" />

// create mapper
EntityMapper mapper = new EntityMapper( <connString> );

// example of query
IList<Person> result = (Ilist<Person>)mapper.ExecuteStatement<Person>( "all", null );

Last edited Jul 22, 2009 at 10:53 AM by antdimot, version 13