开发者

Using Sculpture with NHibernate or Entity Framework

I 开发者_如何学运维recently ran across this open-source project: http://www.codeplex.com/Sculpture

Sculpture is a code-generator which allows you to design your domain model and then use persistence 'molds' such as NHibernate/EF and probably more to generate repositories. It takes care of all the mapping and Data access generation. It looks like it does a heck of a lot more, but i'm pretty much sold at this point. However, i would like to know if anyone here used this for real-world solutions. If so, how well does it scale? How did the generated DAL work for you?


We have taken this out for a spin on a new project we had. Always wanted to try out nHibernate but the XML hell of the config files always put me off. Tried a number of these type "helpers" this is the easiest to use so we decided to use it.

I like the facts that you can just point at databse and it will create object based on what it sees and will resync on demand. It was also good that you could add custom methods to these objects and has a very well written syntax for the generated code all using LINQ-To-NHibernate.

It also generated a respository project over the top to allow you to use this design pattern which we did (again another personal goal).

It all worked out very well, created a social (facebook like) site for people with a medical condition, got everything fully working in 3 weeks with onlt 3 people.

On the whole very happy with this - in fact bought a licence for Sculpture 2.1 Nhibernate mold. (note open source but not for nhibernate mold :-) )

There is room for improvement Windows 7 64 bit had to run visual studio in admin mode (my pc only) - not sure why TeamCity continuous integration had some issues with paths to dll files - the two generated project (ORm and Repository) use different paths to base dll's - so needed to work out position of source in filestore to automate the build but worked fine.

Would like to heard any views on this or other product which people think are better ..

Looking to do a project where we will create all the objects in sculture and get it to produce/update the database for us - will be odd as we are db type developers but will be good to see how this works..

Thanks Simon


I would say that most ORMs are generated in some way at this point. I'm using Linq-to-SQL for a current project, you setup your model and generate code (with attributes from the model).

In short, it's nothing new and there's no reason to rebuff it just because it's generated.
Most ORMs can or do work this way, and they do so well.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜