tags:

views:

323

answers:

2

I am attempting to experiment with linq to sql using this site as a guide.

When running a test I keep getting an error parsing the mapping file I created. The error:

System.Xml.Schema.XmlSchemaException : Database node not found. Is the mapping namespace (http://schemas.microsoft.com/linqtosql/mapping/2007) correctly specified?

Here is the mapping file:

<?xml version="1.0" encoding="utf-8"?>
    <Database Name="Test" xmlns="http://schemas.microsoft.com/linqtosql/mapping/2007"&gt;
      <Table Name="dbo.Categories" Member="Category">
        <Type Name="Category">
          <Column Name="ID" Member="ID" Storage="id" DbType="Char(32) NOT NULL" CanBeNull="false" IsPrimaryKey="true" />
          <Column Name="ParentID" Member="ParentID" Storage="parentID" DbType="Char(32)" />
          <Column Name="Name" Member="Name" Storage="name" DbType="VarChar(50) NOT NULL" CanBeNull="false" />
        </Type>
      </Table>
    </Database>

Can anyone point me in the right direction?

A: 

Figured it out!

the line:

<Table Name="dbo.Categories" Member="Category">

Needed changed to:

<Table Name="dbo.Categories" Member="Categories">

and now its working.

Mike Glenn
A: 

For me is not working. Any other suggestion ?

dancerjude