CodeFluent Entities & Syncfusion for amazing app | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (173).NET Core  (29).NET MAUI  (207)Angular  (109)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (40)Black Friday Deal  (1)Blazor  (215)BoldSign  (14)DocIO  (24)Essential JS 2  (107)Essential Studio  (200)File Formats  (66)Flutter  (132)JavaScript  (220)Microsoft  (118)PDF  (81)Python  (1)React  (100)Streamlit  (1)Succinctly series  (131)Syncfusion  (912)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (51)Windows Forms  (61)WinUI  (68)WPF  (158)Xamarin  (161)XlsIO  (36)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (147)Chart  (130)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (625)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (40)Extensions  (22)File Manager  (7)Gantt  (18)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  (505)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (43)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (386)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (589)What's new  (331)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.

AdeventureWorks1

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:

AdeventureWorks2

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.

AdeventureWorks3

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.

AdeventureWorks4

Interface displaying list of departments

AdeventureWorks5

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

AdeventureWorks6

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.

Tags:

Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed