I have notice that if I create and class derived from
ActiveRecordValidationBase<T> I would get the following exception when
I tried to run the test.
System.Data.SQLite.SQLiteException: SQLite error
no such table: Agents
[ActiveRecord("Agent")]
public class Agent: ActiveRecordValidationBase<Agent>{
private int id;
private string name;
....
}
[Test]
public void Can_Create_Agent()
{
Agent agent = new Agent();
agent.Name = "Agent #1";
Repository<Agent>.Save(agent);
int id = agent.Id;
Assert.Greater(id, 0);
UnitOfWork.CurrentSession.Flush();
UnitOfWork.CurrentSession.Evict(agent);
agent = Repository<Agent>.Get(id);
Assert.AreEqual("Agent #1", agent.Name);
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---