LightSpeed with IoC/Dependency Injection using Repository Pattern?

I don't have an example fro you off-hand, but I can tell you that I stumbled across something of a nasty when implementing my own Repository pattern with Lightspeed on an ASP. NET MVC project.

I don't have an example fro you off-hand, but I can tell you that I stumbled across something of a nasty when implementing my own Repository pattern with Lightspeed on an ASP. NET MVC project. Lightspeed does not allow you to manually assign the primary key value of an entity (at least not without some hairy work-arounds invokving either reflection or hard-coding every entity), which means that in a Repository pattern, you can't simply pass in an entity and ask the Respository to update the database for you, because that entity that you pass it won't have it's primary key set (because the calling code can't set the primary key!).

Like I said there are work-arounds if you're heart-set on Lightspeed. Otherwise, consider an ORM that implements true POCO's, like Entity Framework, N There are plenty of examples of setting up a repository pattern using these ORMs on the net.

Thank you for the comment. We did end up abandoning the framework. Luckily I'm no longer working on that project any more and that was my last project that used .NET.

I'm back to using ruby again and I am once again happy to be working with flexible frameworks. – dsapala Sep 6 '10 at 18:34.

A better answer would be from the MindScape guys, here is a post they'll answer shortly: mindscape.co.nz/forums/Thread.aspx?Threa....

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions