Home > Archive > microsoft.public.certification > March 2004 > Cannot locate a domian structure





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Cannot locate a domian structure
newsgroup user

2004-03-10, 11:24 am

Hi All,

Now, I am using Microsoft.Mapping.Toolki namespace which I found through an example I
got from www.gotdotnet.com.

Below I will give my two classes. These classes are
pretty simple actually. In fact I have this error when
compile it....
"
An unhandled exception of type 'System.Exception'
occurred in System.Data.SqlXml.dll

Additional information: Validation error at 5, 8: Cannot
locate a domain structure
for 'Console_persistence.Person'. "

--------------------Person.cs-----------------------------
using System;
namespace Console_persistence
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class Person
{
private int id;
private string name;
private DateTime birthday;

public int Id
{
get { return this.id; }
set { this.id = value; }
}

public string Name
{
get { return this.name; }
set { this.name = value; }
}

public DateTime Birthday
{
get { return this.birthday; }
set { this.birthday = value; }
}

public Person() {}

public Person(string name, DateTime birthday)

{
this.name = name;
this.birthday = birthday;
}
}
}
----------------------demo.cs-----------------------------

using System;
using System.Data;
using System.Collections;
using Microsoft.ObjectSpaces.ObjectPersistence;
using Microsoft.Mapping.Toolkit;

namespace Console_persistence
{
class demo
{
static ObjectPersistence op = new ObjectPersistence("Data
Source=localhost; Integrated Security=true;");

public demo() { }
[STAThread]
static void Main(string[] args)
{
Person person = new Person("nizar",DateTime.Now);
Console.WriteLine("new name" + person.Name);
op.Persist(person);
}
}
}
Hope to hear the solution ASAP. Thanx
Regards,
Nizar

Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net