CodeTrigger  

Code Generation For C#, WPF, WCF, SQL SERVER/ORACLE/MYSQL and Visual Studio 2013-2019

Tutorial - Generating a sample Client/Server ASP.NET Webforms application with a WCF Service layer
To work with these sample projects you will need CodeTrigger installed, Visual Studio 2013-2017 (Or Sparx Systems Enterprise Architect), and a test database with some data.
Follow these steps below to generate your complete ASP.Net Webforms/WCF sample application without writing a single line of code.
This guide has been updated for version 5.1.0.0 (released June 10th 2017)

Microsoft Northwind Sample db

Step 1 - Ensure you have a relevant test database

The CodeTrigger sample applications are designed to work with your existing database schema to ensure that the samples are as relevant as possible. Ensure that you have a TEST SQL Server/Oracle/MYSQL database handy. CodeTrigger and its associated supplier companies do not accept any liability for data loss whilst using the CodeTrigger product. It is important that you use a test database until you are familiar with the functionality of the generated code.

Step 2 - Create a new CodeTrigger project

From the Visual Studio 'Tools' menu (or from Enterprise Architect's 'Extensions' menu)...

Open CodeTrigger
Select 'New' (or '+' icon)
Solution Name = CodeTriggerWcfWebSample
Location = C:\CodeTriggerSamples
As your Codetrigger Solution settings.

Select the 'DB to Multi-tier Wcf application' wizard
Click Next
Name your new CodeTrigger project 'DemoServiceProject'
Ensure that 'Include DemoServiceProject.Web' is ticked.


Click Next on the Wizard to setup the data source. Click 'Connect' to validate the data source.

Step 3 - Click 'Create' on the Wizard to create your WEB/WCF multi-tier project structure

Click on the 'Schema Objects' tab and select the schema objects you are interested in generating code for

Step 4 - Generate the business objects

Click on the 'Business Objects' tab to generate the domain objects and structures and relationships. Select the business objects you are interested in generating code for

Step 5 - Shoot

Click on the 'Generate Code' button to generate the required code.
Ensure that the relevant lines in the Default.cs file are not commented out.

Build the solution and run!
You may need to build the projects in the following order:
DemoServiceProject.Data,
DemoServiceProject.Business,
DemoServiceProject.Wcf,
Update the WCF Service Reference in the WEB project,
Build the WEB project.
If you update the WCF service reference in the WEB project it may add a duplicate WCF binding in the Web.Config, feel free to remove this before running your generated application.

Thats it, your CodeTrigger Generated ASP.Net WEB/WCF Client/Server Application, without writing a single line of Code!!