So, i'm looking at the TekPub sample for ASP.NET MVC2 (http://mvcstarter.codeplex.com/) using DB4o and there are a bunch of templates to create controllers etc, the generated code looks like:
public ActionResult Details(int id)
{
var item = _session.Single<Account>(x=>x.ID == id);
return View(item);
}
Now, my understanding is that using DB4o or a simliar object database that ID's are not required, so how/what exactly do I pass to enable this kind of templated code to function?
UPDATE: Both answers were useful, I have modifed the templates to use GUID as the ID. I will add any relevant code/notes here once I see how it works out.
UPDATE: So, what I have done (which works exactly as I would expect) is 1. Add an ID to my model i.e.
public Guid ID { get; set; }
Initialize the Guid in the class constructor like so
ID = Guid.NewGuid();
and that's it, all working.