I would like to know better about fluent mapping since reading help is not so clear for me, to know pros and cons about it.
1 Answer, 1 is accepted
answered on 02 Nov 2012, 04:23 PM
In Telerik OpenAccess ORM, the fluent mapping approach is designed for developers that view their code as their model. Its main advantage is that you can manually code your model and automatically derive your database schema from it without the risk of interference from any code-generation tool.
Other basic benefits are:
- the model will be very flexible - you can implement whatever you need, wherever you need it
- it simplifies the work with really large databases (hundreds and thousands of tables, views and etc.) - in such a case, if you use Visual Designer, the generation of the visual representation could be slower and more difficult to maintain
- the functionality of a model created with fluent mapping will be as good as the functionality of a generated one, even in some cases the fluent mapping provides greater control and more advanced mappings than the visual designer
- it is not required to install OpenAccess in order to make changes to the model - suppose you are a large team sharing the same codebase and not all developers have installed OpenAccess
The main risk with the fluent mapping comes from the possible typing errors during the creation of the model. Also the development effort would likely be bigger if you are starting the project from scratch. However, the OpenAccess designer provides functionality for generating fluent mapping code, which could be used as a one-time operation (or not only) to generate the basis of your new fluent model or to migrate your existing XML-based model (rlinq). You could find more information about this functionality here and here.
If you have additional questions, do not hesitate to get back to us.
All the best,
the Telerik team
Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.