all information's of plinqo in this document, i got it from: so, you could visit the link above...
TRANSCRIPT
![Page 1: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/1.jpg)
Generator
![Page 2: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/2.jpg)
http://www.codesmithtools.com/plinqo
All information's of PLINQO in this Document, I got it from:
So, you could visit the link above to research
![Page 3: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/3.jpg)
Introduce CodeSmith generator - PLINQO1
What is PLINQO for NHibernate?2
Key features PLINQO for Nhibernate.3
Getting Started Steps PLINQO for Nhibernate.4
![Page 4: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/4.jpg)
PLINQO is an enhanced alternative for the most popular Object Relational Mapping frameworks. It is a set of CodeSmith Templates designed to simplify the creation and maintenance of data models, as well as provide you with an easy to use data access layer that adhears to best practices.
Introduce CodeSmith generator - PLINQO1
![Page 5: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/5.jpg)
Microsoft's minimalist approach to ORMs, LINQ to SQL is the original lightweight LINQ implementation for data access.
![Page 6: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/6.jpg)
Entity Framework is Microsoft's ORM of choice. It is an advanced framework that uses multiple models to allow for flexibility.
![Page 7: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/7.jpg)
NHibernate is the open source community's ORM of choice. It is a port of Hibernate for Java that has taken on a life of it's own.
![Page 8: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/8.jpg)
Key Features:
Instant Data Layer Generation1.1
Safe Regeneration and Synchronization
1.2
Open Source 1.3
![Page 9: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/9.jpg)
Instant Data Layer Generation1.1
PLINQO will generate all of your database mappings, business entities, and query extensions instantly. Each generated class is separated into editable and generated files, all of which are organized into an intelligible folder structure.
![Page 10: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/10.jpg)
Safe Regeneration and Synchronization
1.2
Quickly and safely regenerate your data layer against your database. PLINQO intelligently seeks out and merges data changes with code changes, allowing you customize your ORM mappings and safely regenerate them!
![Page 11: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/11.jpg)
Open Source 1.3All PLINQO templates and libraries are open source. This puts you in complete control of your source code, and allows you to customize your data layer to fit your needs. Interested in sharing your changes? Submit a patch and get it put into the next build of PLINQO
![Page 12: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/12.jpg)
What is PLINQO for NHibernate?2
- PLINQO NH is a Replace and Enhance alternative to NHibernate.
- PLINQO NH is available in C#, and supports SQL Server, Oracle, DB2, MySQL, and more!
![Page 13: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/13.jpg)
What is PLINQO for NHibernate?2
PLINQO is a set of CodeSmith Templates that generate ORM (Object Relational Mapping) frameworks using consistent design patterns and best practices. PLINQO Frameworks also include an advanced set of features to both simplify and optimize the task of data access.
![Page 14: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/14.jpg)
What is PLINQO for NHibernate?2
Advantaged:- simplifications- optimizations- convenience
The ultimate goal is to take the best of both worlds and put them together into a robust framework that is easy to use.
Without write CRUD (Create, Retrieve, Update, Delete) Method
![Page 15: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/15.jpg)
Key features PLINQO for Nhibernate.3
PLINQO can generated your HBM files, entity classes, and all NHibernate configuration in seconds. It then allows you to safely regenerate that code at anytime, thus synchronizing your mappings with the database while still intelligently preserving custom changes.
![Page 16: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/16.jpg)
Key features PLINQO for Nhibernate.3
Data Layer Generation3.1
Safe Regeneration3.2
Intuitive File Structure3.3
Query Logic3.4
![Page 17: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/17.jpg)
Data Layer Generation3.1
• Generate your HBM files from your database.
• Supports Tables, Views, and Stored Procedures.
• Supports associations and composite keys.
• Generate your Entities from your HBM files.
![Page 18: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/18.jpg)
Safe Regeneration3.2
• Safely regenerate your data layer against your database.
• Intelligently seeks out and merges data changes with code changes.
• Ability to filter what gets updated from the database.
![Page 19: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/19.jpg)
Intuitive File Structure3.3
• Each generated class is separated into editable and generated files.
• Complex types are generated into an organized folder structure.
![Page 20: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/20.jpg)
Query Logic3.4
• Generates chainable query extension methods that simplify query logic.
• Query extensions support advanced comparison and containment operators.
![Page 21: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/21.jpg)
Getting Started Steps PLINQO for Nhibernate.4
How to install CodeSmith Generation4.1
Quick Start4.2
Manual Configuration4.3
![Page 22: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/22.jpg)
How to install CodeSmith Generation4.1
http://code.google.com/p/codesmith/downloads/list?can=3&q=nhibernate
Download latest:
http://docs.codesmithtools.com/display/NHibernate/Getting+Started
Getting Started:
http://docs.codesmithtools.com/display/NHibernate/Home
Documentation:
http://docs.codesmithtools.com/display/NHibernate/Downloads
Additional download and samples:
![Page 23: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/23.jpg)
How to install CodeSmith Generation4.1
These templates are dependent on the following:Development Applications:
CodeSmith Generator Professional 5.x Microsoft Visual Studio 2010
Runtime Assemblies: .NET 4.0 NHibernate 3.2.0.GA
![Page 24: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/24.jpg)
I downloaded and installed CodeSmith Generator 6.0
![Page 25: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/25.jpg)
In the Start menu & Desktop Icon
![Page 26: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/26.jpg)
In the Generator Menu or in the Add New Item dialog
![Page 27: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/27.jpg)
Quick Start4.2
1.Open QuickStart.cst 2.Select a SourceDatabase. 3.Click Generate!
See details in the next slide
![Page 28: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/28.jpg)
Double click on the CodeSmith Generator Explorer Icon see the Code Smith Generator Explorer dialog
![Page 29: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/29.jpg)
1.Database2.Solution3.Data Project4.Web Project5.Test Project
Database Picker here
![Page 30: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/30.jpg)
I use Petshop database to demo
The Category table will be use (3 columns)
![Page 31: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/31.jpg)
Name: define nameProvider Type: SqlSchemaProviderConnection String: use to connect to SqlServer, string connect as the same in the .Net. So you could copy & paste from .Net
Click Test button to test connecting
![Page 32: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/32.jpg)
When select Datasource from Database picker, You will see the result in the left slide
You could change location
Now, click Generate button
DataContext here
![Page 33: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/33.jpg)
In the E:/example folder
In the Petshop.Data, open Petshop.Data.csproj
![Page 34: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/34.jpg)
Right click on the Petshop.Data.csp and choose Generate Outputs
![Page 35: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/35.jpg)
Take the tour Generate :ReferencesEntitiesMapsModelsQueriesEntityBaseDataContext
![Page 36: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/36.jpg)
References
![Page 37: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/37.jpg)
Entities
![Page 38: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/38.jpg)
Maps:Entities Columns in tableFunctions Store ProcedureViews View in database
![Page 39: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/39.jpg)
Maps:Entities Columns in table
![Page 40: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/40.jpg)
Maps:Functions Store Procedure
![Page 41: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/41.jpg)
Maps:Views View in database
![Page 42: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/42.jpg)
Models
![Page 43: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/43.jpg)
Queries
![Page 44: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/44.jpg)
EntityBasePetshopDataContext
![Page 45: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/45.jpg)
Petshop.UI
Open Web.config, you will see connectionStrings tag as below:
I add new WebForm1.aspx to test
![Page 46: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/46.jpg)
Petshop.UI
Right click on Project / Add new Item/ WebForm
![Page 47: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/47.jpg)
Control Name Text
ListBox listCate Display list Cate
Button btnGetListCate Get List Categories
Button btnInsert Insert
Button btnUpdate Update
Button btnDelete Delete
TextBox txtCateId Using display Cate Id
TextBox txtName Using display Cate Name
TextBox txtDescription Using display description
![Page 48: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/48.jpg)
Get List Categories
![Page 49: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/49.jpg)
Selected ListBox
![Page 50: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/50.jpg)
Delete Category
![Page 51: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/51.jpg)
Update Category
![Page 52: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/52.jpg)
Insert Category???
![Page 53: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/53.jpg)
Manual Configuration4.31.Add a CodeSmith Project to your CSharp Project
1. Open your project in Visual Studio. 2. Right click on your project in Solution Explorer and add a "New
Item" 3. Under "Visual Studio C# Items", and add a "CodeSmith
Project" 2.Configure your CSP for PLINQO NHibernate
1. Right click on the CSP and "Manage Outputs" 2. Add Output, select Hbms.cst, and fill in the 2 required
properties 3. Add Output, select Entities.cst, and fill in the 2 required
properties 4. Add Output, select Queries.cst, and fill in the 1 required
property 5. Right click on the CSP and "Generate Outputs"
3.Add a connection string to your App or Web config 1. Name the connection string "nhiberante" or the name of your
database
![Page 54: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/54.jpg)
1. Create Blank Solution with name: StudyCodeSmith
![Page 55: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/55.jpg)
2. Add Petshop.Data class library project into solution
Right click on Solution/ Add/ New Project/ choose Class LibraryEnter Petshop.Data into Name box then click Ok button
![Page 56: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/56.jpg)
3. Add CodeSmith Project into Petshop.Data project
Right click on Petshop.Data/ Add/ New Item
![Page 57: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/57.jpg)
3. Add CodeSmith Project into Petshop.Data project
Choose Generator Project inside CodeSmith Generator, then click Add button
![Page 58: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/58.jpg)
4. Configure your CSP for PLINQO NHibernate
Right click on Project1.csp / choose Manage Outputs
![Page 59: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/59.jpg)
C:\Users\ainuong\Documents\CodeSmith Generator\Samples\v6.0\Templates\Frameworks\PLINQO-NH\CSharp
Assume that, Template in here (you could change location when you Setup CodeSmith Generator):
Click Add Output button
3 Templates:Hbms.cstEntities.cstQueries.cst
InHere
If you don’t know templates location, Please open CodeSmith Generator Explorer, Right click on Templates / Properties to see Templates location.
![Page 60: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/60.jpg)
Define Name what you want
Choose Hbms.cst template location here
Configure as the same Quick Started
Process for Hbms.cst template
![Page 61: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/61.jpg)
Process for Entities.cst template
Choose Entities.cst template location here
![Page 62: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/62.jpg)
Final, you got 3 outputs below:
![Page 63: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/63.jpg)
Process for Queries.cst template
Choose Queries.cst template location here
![Page 64: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/64.jpg)
Right click on Project1.csp/ choose Generate Ouputs
![Page 65: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/65.jpg)
Results as you see…
![Page 66: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/66.jpg)
I add new Petshop.UI winform project. Also, add App.config file
![Page 67: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/67.jpg)
App.config file here
![Page 68: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/68.jpg)
Copy & paste connection string or enter by hand:
Hint: In case Quick Started, CodeSmith auto gen connectionString in to App.config or Web.config, you could copy from here
![Page 69: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/69.jpg)
Add Reference Petshop.Data to Petshop.UI
Right click on Petshop.UI/Add References…
![Page 70: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/70.jpg)
C:\Users\ainuong\Documents\CodeSmith Generator\Samples\v6.0\Templates\Frameworks\PLINQO-NH\Common\NHibernate\
Add Reference Nhibernate library for Petshop.UI
In this case, DLL in my computer location here:
![Page 71: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/71.jpg)
Select dll and click OK to add Reference…
![Page 72: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/72.jpg)
C:\Users\ainuong\Documents\CodeSmith Generator\Samples\v6.0\Templates\Frameworks\PLINQO-NH\Common\CodeSmith.Data\
Add Reference CodeSmith library for Petshop.UI
In this case, DLL in my computer location here:
Select dll and click OK to add Reference…
![Page 73: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/73.jpg)
All References here
![Page 74: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/74.jpg)
All DLL, config file in Release
![Page 75: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/75.jpg)
Choose .NET Framework 4
![Page 76: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/76.jpg)
Control Name Text
ListBox listCate Display list Cate
ListBox listProduct Display list Product
Button btnGetList Get List Categories
Button btnInsert Insert
Button btnUpdate Update
Button btnDelete Delete
TextBox txtCateID Display Cate ID
TextBox txtName Display Cate Name
RichTextBox rtbDescription Display Cate description
![Page 77: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/77.jpg)
using Petshop.Data;using Petshop.Data.Entities; PetshopDataContext context;
private void btnGetList_Click(object sender, EventArgs e) { context = new PetshopDataContext(); var list = from cate in context.Category select cate; listCate.DataSource= list.ToList(); listCate.DisplayMember = "Name"; listCate.ValueMember = "CategoryId"; }
When click Get List Categories button, you will see Data display…
![Page 78: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/78.jpg)
private void listCate_SelectedIndexChanged(object sender, EventArgs e)
{ if (listCate.SelectedValue != null) {
Petshop.Data.Entities.Category c = (Petshop.Data.Entities.Category)listCate.SelectedItem;
txtCateID.Text = c.CategoryId;txtName.Text = c.Name;rtbDescription.Text = c.Description;
listProduct.Items.Clear(); foreach (var p in c.ProductList){ listProduct.Items.Add(p.ProductId +" --- "+p.Name); } }}
Get detail information for each catalog, also display list product of this
![Page 79: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/79.jpg)
Click on the Cate name to show detail information and list product
![Page 80: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/80.jpg)
private void btnUpdate_Click(object sender, EventArgs e)
{ if (listCate.SelectedValue != null) { Petshop.Data.Entities.Category c = (Petshop.Data.Entities.Category)listCate.SelectedItem; c.Name = txtName.Text; c.Description = rtbDescription.Text; context.Category.InsertOnSubmit(c); context.SubmitChanges(); btnGetList.PerformClick(); }}
Update Information
![Page 81: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/81.jpg)
Delete Information
private void btnDelete_Click(object sender, EventArgs e)
{ if (listCate.SelectedValue != null) { Petshop.Data.Entities.Category c = (Petshop.Data.Entities.Category)listCate.SelectedItem; context.Category.DeleteOnSubmit(c); context.SubmitChanges(); btnGetList.PerformClick(); }}
![Page 82: All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research](https://reader036.vdocument.in/reader036/viewer/2022062519/5697bfce1a28abf838ca9a37/html5/thumbnails/82.jpg)
Insert Information
???