SlideShare a Scribd company logo
LINQ
Andreas Gullberg Larsen
What is LINQ?
Language Integrated Query - part of Microsoft .NET Framework
Formulate queries directly in C# and VB instead of SQL
LINQ-to-objects (in-memory data)
LINQ-to-entities (ORM <-> SQL)
Why LINQ?
No need to learn a new query syntax, use your C# programming chops.
Single, consistent query language for working with data - in memory or in databases.
Widely used, adapters for most databases you can think of:
MySQL, MariaDB, MSSQL, PostgreSQL, MongoDB, CouchDB, ...
LINQ - Two tales of syntax
Query syntax - “SQL-like”
Method syntax - “C#-like”
LINQ - Operations
Select (map)
SelectMany (flatten)
LINQ - Operations
Where (filter)
Aggregrate (reduce)
LINQ - Operations
Ordering
Join
GroupBy
Aggregates - Min, Max, Sum, Count, Average
Set - Union, Distinct, Intersect, Except
Element - First, FirstOrDefault, Last, LastOrDefault
Qualifiers - Any, All, Contains
Partitioning - Take, Skip
Conversions - ToList, ToDictionary, ToArray, Cast<T>, OfType<T>
Extending LINQ-to-objects
It is all about IEnumerable
Nugets: MoreLINQ
Writing your own Prepend()
This won’t work against databases!
LINQ-to-entities (databases)
Requires an ORM, Entity Framework ships with .NET for SQL
Has adapters to all the popular databases, MSSQL, MySQL, MariaDB, PostgreSQL…
LINQ is translated to SQL, so this doesn’t work
But this does:
LINQ-to-entities (databases)
LINQ is lazy, no query is run until you call .ToList().
LINQPad
Awesome C# and LINQ scratchpad.
Test out C#, F#, VisualBasic code-snippets
Test out queries with LINQ, SQL, ESQL against databases
Navigate the database from any result set, follow relations and dig deep into the data
Intellisense and supports nugets
Showtime!

More Related Content

What's hot

First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQLFirst steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQLHansamali Gamage
 
Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015Sperasoft
 
Deep Learning with GPUs in Production - AI By the Bay
Deep Learning with GPUs in Production - AI By the BayDeep Learning with GPUs in Production - AI By the Bay
Deep Learning with GPUs in Production - AI By the BayAdam Gibson
 
Austin bdug 2011_01_27_small_and_big_data
Austin bdug 2011_01_27_small_and_big_dataAustin bdug 2011_01_27_small_and_big_data
Austin bdug 2011_01_27_small_and_big_dataAlex Pinkin
 
Approaching graph db
Approaching graph dbApproaching graph db
Approaching graph dbSergey Enin
 
Nosql databases for the .net developer
Nosql databases for the .net developerNosql databases for the .net developer
Nosql databases for the .net developerJesus Rodriguez
 
26 Trillion App Recomendations using 100 Lines of Spark Code - Ayman Farahat
26 Trillion App Recomendations using 100 Lines of Spark Code - Ayman Farahat26 Trillion App Recomendations using 100 Lines of Spark Code - Ayman Farahat
26 Trillion App Recomendations using 100 Lines of Spark Code - Ayman FarahatSpark Summit
 
SOLR Power FTW: short version
SOLR Power FTW: short versionSOLR Power FTW: short version
SOLR Power FTW: short versionAlex Pinkin
 
Slick 3.0 functional programming and db side effects
Slick 3.0   functional programming and db side effectsSlick 3.0   functional programming and db side effects
Slick 3.0 functional programming and db side effectsJoost de Vries
 
Analytical data processing
Analytical data processingAnalytical data processing
Analytical data processingPolad Saruxanov
 
Presto Summit 2018 - 09 - Netflix Iceberg
Presto Summit 2018  - 09 - Netflix IcebergPresto Summit 2018  - 09 - Netflix Iceberg
Presto Summit 2018 - 09 - Netflix Icebergkbajda
 
Cache options for Data Layer
Cache options for Data LayerCache options for Data Layer
Cache options for Data LayerHussain Mansoor
 
What's new in pandas and the SciPy stack for financial users
What's new in pandas and the SciPy stack for financial usersWhat's new in pandas and the SciPy stack for financial users
What's new in pandas and the SciPy stack for financial usersWes McKinney
 
Presto talk @ Global AI conference 2018 Boston
Presto talk @ Global AI conference 2018 BostonPresto talk @ Global AI conference 2018 Boston
Presto talk @ Global AI conference 2018 Bostonkbajda
 
Spark architecture
Spark architectureSpark architecture
Spark architecturedatamantra
 

What's hot (20)

First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQLFirst steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
First steps to Azure Cosmos DB: Getting Started with MongoDB and NoSQL
 
Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015Sperasoft‬ talks j point 2015
Sperasoft‬ talks j point 2015
 
Mongodb lab
Mongodb labMongodb lab
Mongodb lab
 
Deep Learning with GPUs in Production - AI By the Bay
Deep Learning with GPUs in Production - AI By the BayDeep Learning with GPUs in Production - AI By the Bay
Deep Learning with GPUs in Production - AI By the Bay
 
Austin bdug 2011_01_27_small_and_big_data
Austin bdug 2011_01_27_small_and_big_dataAustin bdug 2011_01_27_small_and_big_data
Austin bdug 2011_01_27_small_and_big_data
 
Approaching graph db
Approaching graph dbApproaching graph db
Approaching graph db
 
No sql
No sqlNo sql
No sql
 
JugMarche: Neo4j 2 (Cypher)
JugMarche: Neo4j 2 (Cypher)JugMarche: Neo4j 2 (Cypher)
JugMarche: Neo4j 2 (Cypher)
 
Spry 2017
Spry 2017Spry 2017
Spry 2017
 
Nosql databases for the .net developer
Nosql databases for the .net developerNosql databases for the .net developer
Nosql databases for the .net developer
 
26 Trillion App Recomendations using 100 Lines of Spark Code - Ayman Farahat
26 Trillion App Recomendations using 100 Lines of Spark Code - Ayman Farahat26 Trillion App Recomendations using 100 Lines of Spark Code - Ayman Farahat
26 Trillion App Recomendations using 100 Lines of Spark Code - Ayman Farahat
 
SOLR Power FTW: short version
SOLR Power FTW: short versionSOLR Power FTW: short version
SOLR Power FTW: short version
 
Slick 3.0 functional programming and db side effects
Slick 3.0   functional programming and db side effectsSlick 3.0   functional programming and db side effects
Slick 3.0 functional programming and db side effects
 
Analytical data processing
Analytical data processingAnalytical data processing
Analytical data processing
 
Presto Summit 2018 - 09 - Netflix Iceberg
Presto Summit 2018  - 09 - Netflix IcebergPresto Summit 2018  - 09 - Netflix Iceberg
Presto Summit 2018 - 09 - Netflix Iceberg
 
Cache options for Data Layer
Cache options for Data LayerCache options for Data Layer
Cache options for Data Layer
 
What's new in pandas and the SciPy stack for financial users
What's new in pandas and the SciPy stack for financial usersWhat's new in pandas and the SciPy stack for financial users
What's new in pandas and the SciPy stack for financial users
 
Presto talk @ Global AI conference 2018 Boston
Presto talk @ Global AI conference 2018 BostonPresto talk @ Global AI conference 2018 Boston
Presto talk @ Global AI conference 2018 Boston
 
Spark architecture
Spark architectureSpark architecture
Spark architecture
 
Not only SQL
Not only SQL Not only SQL
Not only SQL
 

Viewers also liked

여성최음제『 W3.ow.to 』 톡 w2015 ♡ 여성최음제판매, 여성최음제효과,여성최음제정품구입,여성최음제부작용,여성최음제지속시간
여성최음제『 W3.ow.to  』 톡 w2015 ♡ 여성최음제판매, 여성최음제효과,여성최음제정품구입,여성최음제부작용,여성최음제지속시간여성최음제『 W3.ow.to  』 톡 w2015 ♡ 여성최음제판매, 여성최음제효과,여성최음제정품구입,여성최음제부작용,여성최음제지속시간
여성최음제『 W3.ow.to 』 톡 w2015 ♡ 여성최음제판매, 여성최음제효과,여성최음제정품구입,여성최음제부작용,여성최음제지속시간전 윤희
 
Neurenberg automation valley 13 november-2015
Neurenberg automation valley 13 november-2015Neurenberg automation valley 13 november-2015
Neurenberg automation valley 13 november-2015Ron van Dooren
 
OGESCO ENGINEERING KUWAIT
OGESCO ENGINEERING KUWAIT OGESCO ENGINEERING KUWAIT
OGESCO ENGINEERING KUWAIT Fady mohamed
 
A member of the Direct Selling Association of Malaysia - Forever Living Products
A member of the Direct Selling Association of Malaysia - Forever Living ProductsA member of the Direct Selling Association of Malaysia - Forever Living Products
A member of the Direct Selling Association of Malaysia - Forever Living ProductsMas ForeverLiving
 
OPC Unified Architecture
OPC Unified ArchitectureOPC Unified Architecture
OPC Unified ArchitectureVishwa Mohan
 
Digipak and Magazine Advert Pitch
Digipak and Magazine Advert PitchDigipak and Magazine Advert Pitch
Digipak and Magazine Advert PitchJack Halford
 
Redefining IoT with Innovation At Every Level - Prith Banerjee, Chief Technol...
Redefining IoT with Innovation At Every Level - Prith Banerjee, Chief Technol...Redefining IoT with Innovation At Every Level - Prith Banerjee, Chief Technol...
Redefining IoT with Innovation At Every Level - Prith Banerjee, Chief Technol...Schneider Electric
 
I-395 Express Lanes Extension
I-395 Express Lanes ExtensionI-395 Express Lanes Extension
I-395 Express Lanes ExtensionFairfax County
 
Introduccion a LINQ
Introduccion a LINQIntroduccion a LINQ
Introduccion a LINQTonymx
 

Viewers also liked (18)

Eloquent ORM
Eloquent ORMEloquent ORM
Eloquent ORM
 
Linq to sql
Linq to sqlLinq to sql
Linq to sql
 
jQuery
jQueryjQuery
jQuery
 
Introducing LINQ
Introducing LINQIntroducing LINQ
Introducing LINQ
 
Understanding linq
Understanding linqUnderstanding linq
Understanding linq
 
Linq
LinqLinq
Linq
 
여성최음제『 W3.ow.to 』 톡 w2015 ♡ 여성최음제판매, 여성최음제효과,여성최음제정품구입,여성최음제부작용,여성최음제지속시간
여성최음제『 W3.ow.to  』 톡 w2015 ♡ 여성최음제판매, 여성최음제효과,여성최음제정품구입,여성최음제부작용,여성최음제지속시간여성최음제『 W3.ow.to  』 톡 w2015 ♡ 여성최음제판매, 여성최음제효과,여성최음제정품구입,여성최음제부작용,여성최음제지속시간
여성최음제『 W3.ow.to 』 톡 w2015 ♡ 여성최음제판매, 여성최음제효과,여성최음제정품구입,여성최음제부작용,여성최음제지속시간
 
Neurenberg automation valley 13 november-2015
Neurenberg automation valley 13 november-2015Neurenberg automation valley 13 november-2015
Neurenberg automation valley 13 november-2015
 
OGESCO ENGINEERING KUWAIT
OGESCO ENGINEERING KUWAIT OGESCO ENGINEERING KUWAIT
OGESCO ENGINEERING KUWAIT
 
A member of the Direct Selling Association of Malaysia - Forever Living Products
A member of the Direct Selling Association of Malaysia - Forever Living ProductsA member of the Direct Selling Association of Malaysia - Forever Living Products
A member of the Direct Selling Association of Malaysia - Forever Living Products
 
Linq
LinqLinq
Linq
 
LINQ in C#
LINQ in C#LINQ in C#
LINQ in C#
 
Linq
LinqLinq
Linq
 
OPC Unified Architecture
OPC Unified ArchitectureOPC Unified Architecture
OPC Unified Architecture
 
Digipak and Magazine Advert Pitch
Digipak and Magazine Advert PitchDigipak and Magazine Advert Pitch
Digipak and Magazine Advert Pitch
 
Redefining IoT with Innovation At Every Level - Prith Banerjee, Chief Technol...
Redefining IoT with Innovation At Every Level - Prith Banerjee, Chief Technol...Redefining IoT with Innovation At Every Level - Prith Banerjee, Chief Technol...
Redefining IoT with Innovation At Every Level - Prith Banerjee, Chief Technol...
 
I-395 Express Lanes Extension
I-395 Express Lanes ExtensionI-395 Express Lanes Extension
I-395 Express Lanes Extension
 
Introduccion a LINQ
Introduccion a LINQIntroduccion a LINQ
Introduccion a LINQ
 

Similar to LINQ and LINQPad

Monogo db in-action
Monogo db in-actionMonogo db in-action
Monogo db in-actionChi Lee
 
Brk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBrk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBob Ward
 
Data science and OSS
Data science and OSSData science and OSS
Data science and OSSKevin Crocker
 
A look under the hood at Apache Spark's API and engine evolutions
A look under the hood at Apache Spark's API and engine evolutionsA look under the hood at Apache Spark's API and engine evolutions
A look under the hood at Apache Spark's API and engine evolutionsDatabricks
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBXESUG
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache SparkVincent Poncet
 
From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016
From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016
From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016DataStax
 
Scaling for Performance
Scaling for PerformanceScaling for Performance
Scaling for PerformanceScyllaDB
 
Boston Spark Meetup event Slides Update
Boston Spark Meetup event Slides UpdateBoston Spark Meetup event Slides Update
Boston Spark Meetup event Slides Updatevithakur
 
Apache Spark - San Diego Big Data Meetup Jan 14th 2015
Apache Spark - San Diego Big Data Meetup Jan 14th 2015Apache Spark - San Diego Big Data Meetup Jan 14th 2015
Apache Spark - San Diego Big Data Meetup Jan 14th 2015cdmaxime
 
Rolling With Riak
Rolling With RiakRolling With Riak
Rolling With RiakJohn Lynch
 
Apache spark-melbourne-april-2015-meetup
Apache spark-melbourne-april-2015-meetupApache spark-melbourne-april-2015-meetup
Apache spark-melbourne-april-2015-meetupNed Shawa
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity FrameworkDoncho Minkov
 
Microsoft R - Data Science at Scale
Microsoft R - Data Science at ScaleMicrosoft R - Data Science at Scale
Microsoft R - Data Science at ScaleSascha Dittmann
 
Advanced Data Science on Spark-(Reza Zadeh, Stanford)
Advanced Data Science on Spark-(Reza Zadeh, Stanford)Advanced Data Science on Spark-(Reza Zadeh, Stanford)
Advanced Data Science on Spark-(Reza Zadeh, Stanford)Spark Summit
 
A Hands-on Intro to Data Science and R Presentation.ppt
A Hands-on Intro to Data Science and R Presentation.pptA Hands-on Intro to Data Science and R Presentation.ppt
A Hands-on Intro to Data Science and R Presentation.pptSanket Shikhar
 
Experience sql server on l inux and docker
Experience sql server on l inux and dockerExperience sql server on l inux and docker
Experience sql server on l inux and dockerBob Ward
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNico Ludwig
 

Similar to LINQ and LINQPad (20)

LINQ/PLINQ
LINQ/PLINQLINQ/PLINQ
LINQ/PLINQ
 
Monogo db in-action
Monogo db in-actionMonogo db in-action
Monogo db in-action
 
Brk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBrk2051 sql server on linux and docker
Brk2051 sql server on linux and docker
 
Data science and OSS
Data science and OSSData science and OSS
Data science and OSS
 
A look under the hood at Apache Spark's API and engine evolutions
A look under the hood at Apache Spark's API and engine evolutionsA look under the hood at Apache Spark's API and engine evolutions
A look under the hood at Apache Spark's API and engine evolutions
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBX
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Spark
 
From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016
From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016
From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016
 
Scaling for Performance
Scaling for PerformanceScaling for Performance
Scaling for Performance
 
Boston Spark Meetup event Slides Update
Boston Spark Meetup event Slides UpdateBoston Spark Meetup event Slides Update
Boston Spark Meetup event Slides Update
 
Apache Spark - San Diego Big Data Meetup Jan 14th 2015
Apache Spark - San Diego Big Data Meetup Jan 14th 2015Apache Spark - San Diego Big Data Meetup Jan 14th 2015
Apache Spark - San Diego Big Data Meetup Jan 14th 2015
 
Rolling With Riak
Rolling With RiakRolling With Riak
Rolling With Riak
 
Apache spark-melbourne-april-2015-meetup
Apache spark-melbourne-april-2015-meetupApache spark-melbourne-april-2015-meetup
Apache spark-melbourne-april-2015-meetup
 
Spark meetup TCHUG
Spark meetup TCHUGSpark meetup TCHUG
Spark meetup TCHUG
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity Framework
 
Microsoft R - Data Science at Scale
Microsoft R - Data Science at ScaleMicrosoft R - Data Science at Scale
Microsoft R - Data Science at Scale
 
Advanced Data Science on Spark-(Reza Zadeh, Stanford)
Advanced Data Science on Spark-(Reza Zadeh, Stanford)Advanced Data Science on Spark-(Reza Zadeh, Stanford)
Advanced Data Science on Spark-(Reza Zadeh, Stanford)
 
A Hands-on Intro to Data Science and R Presentation.ppt
A Hands-on Intro to Data Science and R Presentation.pptA Hands-on Intro to Data Science and R Presentation.ppt
A Hands-on Intro to Data Science and R Presentation.ppt
 
Experience sql server on l inux and docker
Experience sql server on l inux and dockerExperience sql server on l inux and docker
Experience sql server on l inux and docker
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_iv
 

Recently uploaded

Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandIES VE
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessWSO2
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...Alluxio, Inc.
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAlluxio, Inc.
 
iGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockiGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockSkilrock Technologies
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...rajkumar669520
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfkalichargn70th171
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion Clinic
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAlluxio, Inc.
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1KnowledgeSeed
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfmbmh111980
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareinfo611746
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationWave PLM
 

Recently uploaded (20)

Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
iGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockiGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by Skilrock
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 

LINQ and LINQPad

  • 2. What is LINQ? Language Integrated Query - part of Microsoft .NET Framework Formulate queries directly in C# and VB instead of SQL LINQ-to-objects (in-memory data) LINQ-to-entities (ORM <-> SQL)
  • 3. Why LINQ? No need to learn a new query syntax, use your C# programming chops. Single, consistent query language for working with data - in memory or in databases. Widely used, adapters for most databases you can think of: MySQL, MariaDB, MSSQL, PostgreSQL, MongoDB, CouchDB, ...
  • 4. LINQ - Two tales of syntax Query syntax - “SQL-like” Method syntax - “C#-like”
  • 5. LINQ - Operations Select (map) SelectMany (flatten)
  • 6. LINQ - Operations Where (filter) Aggregrate (reduce)
  • 7. LINQ - Operations Ordering Join GroupBy Aggregates - Min, Max, Sum, Count, Average Set - Union, Distinct, Intersect, Except Element - First, FirstOrDefault, Last, LastOrDefault Qualifiers - Any, All, Contains Partitioning - Take, Skip Conversions - ToList, ToDictionary, ToArray, Cast<T>, OfType<T>
  • 8. Extending LINQ-to-objects It is all about IEnumerable Nugets: MoreLINQ Writing your own Prepend() This won’t work against databases!
  • 9. LINQ-to-entities (databases) Requires an ORM, Entity Framework ships with .NET for SQL Has adapters to all the popular databases, MSSQL, MySQL, MariaDB, PostgreSQL… LINQ is translated to SQL, so this doesn’t work But this does:
  • 10. LINQ-to-entities (databases) LINQ is lazy, no query is run until you call .ToList().
  • 11. LINQPad Awesome C# and LINQ scratchpad. Test out C#, F#, VisualBasic code-snippets Test out queries with LINQ, SQL, ESQL against databases Navigate the database from any result set, follow relations and dig deep into the data Intellisense and supports nugets Showtime!