CodeFluent Entities & Syncfusion for amazing app | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (182).NET Core  (28).NET MAUI  (233)Angular  (117)ASP.NET  (49)ASP.NET Core  (81)ASP.NET MVC  (87)Azure  (42)Black Friday Deal  (1)Blazor  (244)BoldSign  (15)DocIO  (24)Essential JS 2  (110)Essential Studio  (201)File Formats  (74)Flutter  (140)JavaScript  (227)Microsoft  (122)PDF  (86)Python  (1)React  (107)Streamlit  (1)Succinctly series  (131)Syncfusion  (993)TypeScript  (33)Uno Platform  (3)UWP  (3)Vue  (46)Webinar  (53)Windows Forms  (59)WinUI  (72)WPF  (165)Xamarin  (159)XlsIO  (38)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (11)Business intelligence  (55)Button  (4)C#  (164)Chart  (154)Chart of the week  (62)Cloud  (16)Company  (440)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (74)Development  (694)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (7)Essential Tools  (13)Excel  (43)Extensions  (31)File Manager  (8)Gantt  (23)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (530)Mobile MVC  (9)OLAP server  (2)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (48)Performance  (13)PHP  (2)PivotGrid  (5)Predictive Analytics  (6)Report Server  (3)Reporting  (8)Reporting / Back Office  (9)Rich Text Editor  (12)Road Map  (12)Scheduler  (54)Security  (5)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (32)Solution Services  (4)Spreadsheet  (11)SQL  (15)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (426)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (648)What's new  (354)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)

CodeFluent Entities & Syncfusion for amazing app

When applications are beautiful, fast, and robust at the same time, we qualify them as amazing. If you think it also means a long development process, then you have not seen applications using both SoftFluent and Syncfusion products together!

SoftFluent and Syncfusion have partnered to help you build these amazing applications in no time. CodeFluent makes the application highly functional, while Syncfusion makes the application interface elegant and user-friendly.

CodeFluent Entities is a unique product integrated into Visual Studio that allows developers to generate database scripts, code, web services, and UIs in the Microsoft .NET platform. The code generation process is model-first and continuous: from your declarative model, a meta-model will be inferred, which code generators will then translate into code. Over 20 code generators (a.k.a. producers) are provided out of the box and can be combined to create your own application following your desired architecture, using your desired technologies.

Whether you need to build applications with WinForms or WPF, or websites with WebForms or MVC, SoftFluent and Syncfusion provide all the necessary tools to help you.

To show you how it works, we have built a full application using CodeFluent Entities and Syncfusion components. Using Visual Studio 2012, we created a WPF application that consumes web services in order to communicate with a SQL Server 2008 database. The database we used is a sample database of Microsoft SQL Server, called AdventureWorks.

The application can be created in five steps:

1. Start with a CodeFluent Entities project

Create a CodeFluent Entities project in Visual Studio 2012. You also need a class library project that contains the business-object model, a class library project (proxy) that contains your web service contracts, and the WPF application.

2. Import the AdventureWorks database

If you right-click on the CodeFluent Entities project, you will have an option to import an existing database or model, as you can see on the following screenshot.


Then follow the instructions to import the AdventureWorks database.

3. Set up the producers

Once the database has been imported, you can view the visual model inside the CodeFluent Entities project (Surface > Default) as you can see here:


Now that you have your model, you need to add producers. These producers are responsible for generating code for your application.

The first producer is the BOM (Business Object Model) producer, which corresponds to the business logic. The generated code will contain classes for each entity of your model. This code is exceptionally readable and can be customized using partial classes, if needed. This producer also contains a sub-producer responsible for generating services.

The second producer is the SQL producer, which is responsible for generating SQL scripts, such as tables, views, and stored procedures.

The third producer is the WPF ClickOnce Smart Client, which is responsible for generating UIs. These UIs are generated using templates located in the CodeFluent folder. We will discuss this in more detail later.

The fourth producer is the template, responsible for creating a host for the web services.

The fifth is the Command Line Execution producer, responsible for running a batch file that will insert data in your database.


4. Generate the model

The model is now ready to be generated. In a single click, the CodeFluent Entities project will load your model in memory, and run each of the producers to generate ASP.NET code (C# in this example), SQL scripts, and WPF controls. The application is almost ready to run. The last steps are to:

  1. Set up the connection string in your WPF application.
  2. Set up the application that hosts the web services to run at the same time as the WPF application.

That is all you need to do in order to run the application! When you launch the application, you will have a list of all entities, and you will be able to manipulate the data of these entities with generic methods such as load, load all, update, delete, and save. Each of these actions will consume the web services hosted in the other application.

5. Syncfusion components

The complete WPF application uses standard ASP.NET controls. Though these components are functional, they are not always the best looking. This is where Syncfusion comes in to transform a functional application into an amazing application.

CodeFluent Entities generates reusable controls for the application, so one control can be used in several pages. As a result, the work involves updating these ASP.NET standard controls with Syncfusion controls to end up with a highly functional and beautiful application.


Interface displaying list of departments


Interface displaying edition of a department in a pop-up window


Interface displaying edition of the SalesTerritory field corresponding to a list prefilled with related entity

Using the power of CodeFluent Entities to generate functional applications quickly, and the power of Syncfusion’s beautiful components, you can create amazing applications in no time.

6. Unlimited possibilities

To go further with CodeFluent Entities and Syncfusion integration, you can reuse Syncfusion components in other applications at no cost. Indeed, CodeFluent Entities uses templates to generate components, such as the view page, the edit form, and so on. These templates are available in the CodeFluent folder (where it is usually installed at \CodeFluent\Modeler\Templates\SmartClient).

Extremely simple to read and understand, these templates can be modified to produce pages with custom components, such as the ones provided by Syncfusion. Each CodeFluent Entities project can reuse these modified templates to produce attractive and powerful applications. Although you have developed a WPF application in this example, you can also develop other types of applications, such as WinForms, WebForms, MVC, mobile, or any combination of these technologies.

See an example by downloading the SoftFluent-Syncfusion joint demo.


Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed