Dapper
Dapper
Author : Khushbu
Sihora
Aartronix Innovation Pvt.Ltd 1
What is Dapper ?
Dapper is an open – source Object Relational Mapping(ORM) library for .NET
application. It allows you to map database objects to C# objects.
The library allows developers quickly and easily access data from databases without
the need to write tedious code.
Dapper is known for its performance and simplicity, making it a popular choice
among developers.
With Dapper you can easily perform CRUD Operation on your database. It support
basic Operations such as Select , Insert , Update and Delete .
M a p p i n g i s m a p o n e o b j e c t t o a n o t h e r o b j e c t , w h i c h a re t h e s a m e
t y p e a n d d i ff e re n t t y p e .
• C re a t e D ATA B A S E a n d TA B L E .
• To g e t s t a r t e d w i t h D a p p e r , y o u n e e d t o i n s t a l l t h e D a p p e r N u G e t p a c k a g e a n d
c re a t e a c o n n e c t i o n s t r i n g t o y o u r d a t a b a s e . T h e n , y o u c a n u s e D a p p e r ' s Q u e r y
o r E xe c u t e m e t h o d s t o exe c u t e S Q L q u e r i e s a n d m a p t h e m t o y o u r o b j e c t s .
• I n S o l u t i o n E x p l o re r c re a t e D B Fo l d e r.
• I n D B Fo l d e r c re a t e M O D E L f o l d e r a n d A P P D B . C S c l a s s fi l e .
• A P P D B . C S c l a s s fi l e f o r C o n n e c t i o n S t r i n g ( M S S Q L / M Y S Q L ) .
MSSQL
Select