5

I found this article [http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/], which explains how to use MVC Scaffolding with one-to-many relationships in EF to create a listbox with an enumerated collection as the choice.

I tried using this with my project, but I have run into a problem - I don't want to use EF (or include a reference to it). I am using POCOs which are then mapped using a repository pattern and persisted using NHibernate.

Is there a way to create the same scaffolding listboxes for POCOs without having to create the DataContext which the article created.

Edit: I do know how to do this manually, I am looking for a way for the scaffold code to do this for me.

3
  • Did you find anything on this? I'm looking for the same and couldn't find anything. Thanks Commented Sep 9, 2011 at 14:36
  • No there were no out of the box solutions - I am looking at making some though and I will put them on codeplex if/when. Commented Sep 13, 2011 at 8:31
  • Is there a currently active framework/tool for asp.net scaffolding around an EF or nhibernate object set? I am looking for one... Commented Jul 7, 2014 at 5:56

2 Answers 2

3

I think the post on Overriding T4 Templates from the same series should tell you all you need to know to switch to a repository template based on NHibernate. If you end up implementing your own, please post them somewhere :)

Sign up to request clarification or add additional context in comments.

3 Comments

I'll release them if I get around to making them. Thanks.
@Macropus did you ever get around to releasing them ?
I made some very very simple ones but never released them. I will dig them out and see if they are good enough to stick up on GitHub.
1

I've seen a project, that tried to implement templates for NHibernate and MVC scaffolding, but according to this thread it seems to be closed.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.