Is there a Class Map generator for Fluent NHibernate? I need something like db2hbm but I want it to generate Fluent Class Maps instead of xml mappings.
I am aware of AutoMapping for Fluent but that is not what I want. I want to be able to generate Class Map files from tables in database and push them to my src repository.
You can do this with NHibernate Mapping Generator.
You can do this with Visual NHibernate. Check the Fluent Nhibernate option on the Options screen to create FNH mapping code.
LLBLGen Pro is a great tool that can do this and much more. It´s not free, but it´s worth every cent.
This is the closest thing I've come across (T4 Templates example to generate Fluent NH mappings):
http://www.pnpguidance.net/Post/SampleFluentNHibernateT4TemplatesCodeGenerationLINQToSQL.aspx
Related
What's the recommended way of creating a Data Access layer in real-life ASP.NET MVC applications? Is it EF? Ef Code First? NHibernate? Any other idea?
Thank you & regards
There is no recommend way.
I prefer EF Code First for doing this because
the Sourcecode is very clean and easy to read
It is easy to simple change the connectionstring and generate a new database if not already exists
easy to migrate your Database if your Model has changed (no need to recreate the Database) using EntityFramework.SqlMigrations
if your Database already exists you can use the Entity Framework Power Tools to generate the Models and Database context from your existing Database
It all depends of your need:
NHibernate is a more mature ORM with a big community
Entity Framework is now getting very well supported and you can find also great information (check Julie Lerman blog)
Both support code generation from database.
Code first: allows you to create your database schema from your domain models. This is great if you don't want to bother with database. NHibernate can do it also.
To help you decide which way to use Entity Framework
Source
There are many other great ORM:
Subsonic
Stackoverflow's ORM Dapper if performance is an important criteria there is a small benchmark on the site
If you're partial to the MSFT tooling and wanting to be "modern", then EF Code First is probably the place to start. One example worth perusing: https://github.com/NuGet/NuGetGallery .
I like to use Model First because it allows me the most freedom to design and implement in my opinion. It also makes it very easy to change the database design.
There is none, stackoverflow is full of people who have gone down the various routes, so you can get help no matter which choice you make.
Best advice, try doing a few small exploratory webs using a couple of approaches which seem to stand out.
The MVC gurus (the people who wrote MVC) at MS all seem to use Entity Framework at the moment. having said that you can use any ORM (or really any data access tech you want) as MVC doesnt actually specify anything at all about the way you access data
Try LINQ, most MVC products I see make use of LINQ.
I'm looking for a Delphi VCL component that allows my customers to visually create a database, that is, tables, fields, indexes, etc. Something like this: http://www.devart.com/blogs/dbforge/?p=136#more-136, but available as a third-party component to be embedded into an application. Do you know of something like this? I'm not looking for visual query builders, but database design components.
You could start by looking into ESS Model source code: ess model is a free & open source UML desing and UML reversing tool wich export model data to XMI-format. Once your model generated, you could take it on from there and generate your SQL scripts.
Download : http://essmodel.cvs.sourceforge.net/viewvc/essmodel/essmodel/
Source Code : http://essmodel.cvs.sourceforge.net/viewvc/essmodel/essmodel/
http://www.tmssoftware.com/site/diagram.asp
Not sure, but the TDatabaseSchema component in Context Software's Database Extensions component set may be close to what you're looking for:
Context Database Extensions
Or maybe you would want/need to combine it with their end-user "Database Designer" product, which can be registered as the component editor for TDatabaseSchema. ( Database Designer ) The author would be happy to clarify if you asked, I'm sure.
I am writing an app which is to be intranet based .I am trying to use silverlight with Ado.net Just like I write my aspx pages. BUt I have not found how to connect datatable generated from my class directly to my silverlight interfaces.
ANy tut that can help me with this.
Silverlight cannot connect to a database directly, it only supports webservice access. Here are two links to get you started:
http://wildermuth.com/2009/09/29/Choosing_a_Data_Access_Layer_for_Silverlight_3
http://www.c-sharpcorner.com/uploadfile/nipuntomar/dataaccesssilverlightenabledwcfservice07152008013110am/dataaccesssilverlightenabledwcfservice.aspx
Or just google "silverlight data access" and you will get plenty of hits.
If you insist on using DataTables, you may take a look at the BindableDataGrid project which includes these.
I however strongly recommend against. A better approach for dynamic data would perhaps be to use some kind of DynamicEntity class.
Is is it possible to use l2s in model first approach?
Here's the think i want to achieve:
I want to write my app in TDD manner, so I want to write some domain specific objects first and then base on that generate database model.
One solution is to l2s as DAL but and map linq generated entities to my custom domain objects(I Rob C. in Storefront app did), but i would like to use l2s objects directly
Other solution is to use T4 Toolbox: LINQ to SQL schema generator but it is based on visual team system IDE, which I don't have access to
Last solution i found is to use Close2Poco
Have you tried any of this solutions ?
Is it easy to achieve with l2s?
P.S.
Sorry for my english
Not with the current version. Visual Studio 2010 will support this. There's currently a preview release available from Microsoft here:
http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx
I'm wondering if there are any applications, preferably freeware, that can take a database configuration, and, with as little hassle as possible, create web forms for inserting data easily.
I'm finding it hard to express exactly what it is I'm after. Maybe I can talk a bit about what I need.
I have a configuration database that, at least usually, contains "the truth" about the servers in our system. It contains stuff like zone names, hostnames, different configuration items, etc, over multiple tables. Right now we're using simple INSERTs directly when adding new servers or other stuff, handling the keys and IDs ourselves. The crux is, they don't want us to develop a simple web form thingy to handle this, instead they want a tool that can generate the web form thingy. Did that make sense?
I'm not sure if anything like this exists or is reliable, but, I thought that if anyone knew, it's this community. Thanks!
As many have already stated, it depends on what technology you're working with:
.Net 3.5 - Dynamic Data or Subsonic's Scaffolding control
.Net 2.0 - Subsonic's Scaffolding control
PHP - CakePHP
Ruby - Rail's Scaffolding component
"with as little hassle as possible"
have you checked things like PHP/MySQL Web Database Application Code Generator 10.02 ?
or phpmyedit ?
seems to me that what everybody else proposed so far requires a fair amount of coding...
Also, have a look at phprunner. It is not free, but looking at the screenshots, it seems to fit your requirements.
ASP.NET has Dynamic Data, that I think fits your description.
There's also SubSonic. Both are free and open source.
Tried Dynamic Data?
Besides ASP.NET dynamic data, you could also have a look at SubSonic
With PHP, if you have the ability to name the tables and columns as you see fit, you could try CakePHP framework, and specifically the scaffolding feature. With scaffolding turned on, the code will create CRUD forms from the schema for you.
Here's the link for learning about SubSonic & Scaffolding http://www.subsonicproject.com/web-forms-controls/the-scaffold/
, enjoy ;)
One more link from the SubSonic forums http://monk.thelonio.us/post/Scaffold-Enhancements-in-SubSonic-21.aspx
You can try Adminer Editor
Adminer Editor is both easy-to-use and user-friendly database editing tool written in PHP. It is suitable for common users, as it provides high-level data manipulation.