In our previous posts, we’ve seen that from a single platform independent model (see CodeFluent Entities is not an ORM) you can generate continuously (see Continuous Generation) complete databases, .NET classes, web services or UIs.
That’s great but when you’re developing your application, this will all be empty and just like an empty party, an empty app is no fun
Well using CodeFluent Entities, from Visual Studio, you can specify “instances of data” in your model. What’s great about instances is that persistence producers such as the SQL Server producer, Oracle Database producer or SQL Azure producer, will translate those into a SQL script which will insert/update data in your app!
Here’s an example:
Select an entity and click on “Add Instance” to add instances one by one using the instance dialog.
You can also use the instance grid (accessible from the ribbon, in the “Batch Modeling” group) to multiple instances at a time in a grid:
For the newcomers, we published a while ago a 1 minute video illustrating how to generate code and data using CodeFluent Entities, plus using the generated code right away in the following post: How to generate with data (video)
CodeFluent Entities is a model-first tool for continuous generation of all layers and their plumbing code.
The idea is that CodeFluent Entities will generate all the recurrent and low value code, so that developers will be able to focus on the fun part 🙂
The first step in doing so, is that when using CodeFluent Entities, once you generated your persistence layer and business object model, displaying a list of data is dead – simple: all you have to do is data-bind to the business class.
Since a picture is worth a thousand words, here’s a small webcast illustrating:
- how to generate a small contact manager application with test data (SQL Server database and the business object model),
- how to show all stored data in an ASP.NET web page using the generated code.
Tomorrow we’ll add creation, edition and delete capabilities to our web site 🙂
The R&D Team