Handling ID's with db4o and ASP.NET MVC2

Posted by Craig McGuff on Stack Overflow See other posts from Stack Overflow or by Craig McGuff
Published on 2010-04-28T11:44:56Z Indexed on 2010/04/29 1:17 UTC
Read the original article Hit count: 258

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about db4o