Repository Pattern with C# and Entity Framework, Done Right | Mosh

Programming with Mosh • October 15, 2015
Video Thumbnail
Programming with Mosh Logo

Programming with Mosh

@programmingwithmosh

About

Hi! I'm Mosh 👋, a software engineer with over 20 years of experience. I'm all about clear, concise, practical coding tutorials – no fluff, just the good stuff! My courses focus on real-world projects and the skills that will get you hired. I've helped millions of students transform their careers. Want to level up your skills? Subscribe and hit the bell to get notified when I upload new videos! For sponsorships: [email protected]

Video Description

🔥Get the COMPLETE Entity Framework course (80% OFF - LIMITED TIME): http://bit.ly/2rZAgrD Want to learn more from me? Check out my these links: Courses: https://codewithmosh.com Blog: https://www.programmingwithmosh.com/ Facebook: https://www.facebook.com/programmingwithmosh Twitter: https://twitter.com/moshhamedani Confused about the repository pattern? This tutorial explains it all. There are many tutorials about the repository pattern and many of them are conflicting. If you've been confused about the proper way to implement the repository and unit of work patterns with Entity Framework, this video is for you. 00:00 What is the Repository Pattern? 00:47 Benefits of the Repository Pattern 03:50 Repository in a Nutshell 04:47 What is the Unit of Work Pattern? 05:00 Does Entity Framework Really Implement Repository and Unit of Work Patterns? 09:31 Clean Architecture 11:43 Implementing the Repository Pattern 14:09 Implementing the Unit of Work Pattern 15:09 Repository and Unit of Work Patterns in Code 22:49 Example of Repository and Unit of Work Patterns Download the source code for this video here: http://programmingwithmosh.com/wp-content/uploads/2015/10/RepositoryPattern.zip And here are some YouTube videos of mine you might be interested in: Event and Delegates in C# https://youtu.be/jQgwEsJISy0?list=PLTjRvDozrdlz3_FPXwb6lX_HoGXa09Yef Generics https://youtu.be/gyal6TbgmSU?list=PLTjRvDozrdlz3_FPXwb6lX_HoGXa09Yef

Instant Home Upgrade

AI-recommended products based on this video

Loading...
LEGO Icons Bonsai Tree Building Set - Artificial Bonsai Tree Plants for Home Decor, Adults Ages 18+ - Faux, Fake Plants for Table, Desk, Office - Birthday Gift for Men & Women - 10281

LEGO Icons Bonsai Tree Building Set - Artificial Bonsai Tree Plants for Home Decor, Adults Ages 18+ - Faux, Fake Plants for Table, Desk, Office - Birthday Gift for Men & Women - 10281

(22,441)
$59.99
PrimeFREE delivery Sat, Jun 14
600+ bought in past month
Loading...
RoboSeal Rechargeable Mason Jar Vacuum Sealer for Mason Jars Wide and Regular, One Touch Vacuum Sealer for Jars, 10 Lids Included, Digital Battery Indicator, As Seen on TV

RoboSeal Rechargeable Mason Jar Vacuum Sealer for Mason Jars Wide and Regular, One Touch Vacuum Sealer for Jars, 10 Lids Included, Digital Battery Indicator, As Seen on TV

(190)
$36.09
Prime
2K+ bought in past month
Loading...
Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

(786)
$69.15$33.51
FREE delivery Jun 13 - 17
Loading...
Command Medium Picture Hanging Strips [Removable]: 12 Pairs (White)

Command Medium Picture Hanging Strips [Removable]: 12 Pairs (White)

(23,669)
$10.38
FREE delivery Mon, Sep 15 on your first order
5K+ bought in past month
Loading...
Koolmox Koolmox Canvas Grocery Bag, 6-Pack 22'' Large Bags with Reinforced Handles, 12 Oz Heavy Duty Reusable Washable Grocery Shopping Bags Plain Bags for Teacher Paint Embroidery Draw DIY Art Craft Totes

Koolmox Koolmox Canvas Grocery Bag, 6-Pack 22'' Large Bags with Reinforced Handles, 12 Oz Heavy Duty Reusable Washable Grocery Shopping Bags Plain Bags for Teacher Paint Embroidery Draw DIY Art Craft Totes

(144)
$39.99
PrimeFREE delivery Sat, Jun 14
Loading...
Windshield Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit (2 Pack) (Black)

Windshield Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit (2 Pack) (Black)

(32)
$8.99
FREE delivery Wed, Mar 25 on your first order
Loading...
Windshield Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit (2 Pack) (Black)

Windshield Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit (2 Pack) (Black)

(34)
$8.70
FREE delivery Fri, Feb 13 on your first order
300+ bought in past month
Loading...
Windshield Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit (2 Pack) (Black)

Windshield Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit (2 Pack) (Black)

(41)
$8.18
Prime
800+ bought in past month
Loading...
Windshield Crack Repair kit Windshield Repair kit, Glass Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit 2 Pack (Drakgray)
Best Seller

Windshield Crack Repair kit Windshield Repair kit, Glass Repair kit, DIY Glass Cracked Repair Kits, Easy to Use Automotive Glass Nano Repair Fluid, Scratch Chip Cracks Repair Kit 2 Pack (Drakgray)

(44)
$9.20
FREE delivery Fri, Oct 24 on your first order
500+ bought in past month
Loading...
PETCEE Kindergarten Graduation Picture Frame 2025 Preschool Pre-K Graduation Picture Frame My First Photo Frame Gifts for Kids Children Boys Girls Students Daughter Son

PETCEE Kindergarten Graduation Picture Frame 2025 Preschool Pre-K Graduation Picture Frame My First Photo Frame Gifts for Kids Children Boys Girls Students Daughter Son

(397)
$39.01$36.65
FREE delivery Feb 12 - 17Only 8 left in stock.
Loading...
FANGOR 10.1 Inch WiFi Digital Picture Frame 1280x800 HD IPS Touch Screen, Electronic Smart Photo Frame with 32GB Storage, Auto-Rotate, Instantly Share Photos/Videos via Uhale App from Anywhere

FANGOR 10.1 Inch WiFi Digital Picture Frame 1280x800 HD IPS Touch Screen, Electronic Smart Photo Frame with 32GB Storage, Auto-Rotate, Instantly Share Photos/Videos via Uhale App from Anywhere

(1,411)
$59.99
FREE delivery Wed, Aug 20
100+ bought in past month
Loading...
Skylight Digital Picture Frame - WiFi Enabled with Load from Phone Capability, Touch Screen Digital Photo Frame Display - Customizable Gift for Friends and Family - 10 Inch Black

Skylight Digital Picture Frame - WiFi Enabled with Load from Phone Capability, Touch Screen Digital Photo Frame Display - Customizable Gift for Friends and Family - 10 Inch Black

(22,633)
$159.00$127.20
FREE delivery Wed, Aug 20
300+ bought in past month
Loading...
Aura Carver WiFi Digital Picture Frame | The Best Digital Frame for Gifting | Send Photos from Your Phone | Quick, Easy Setup in Aura App | Free Unlimited Storage | Gravel with White Mat

Aura Carver WiFi Digital Picture Frame | The Best Digital Frame for Gifting | Send Photos from Your Phone | Quick, Easy Setup in Aura App | Free Unlimited Storage | Gravel with White Mat

(4,128)
$179.00
PrimeFREE delivery Sat, Jun 14
400+ bought in past month
Loading...
LaLaGreen Wall Planters - 16 Inch Wall Planters for Indoor Plants, 3 Tier Galvanized Succulent Wall Mounted Planters, Metal Boho Window Herb Garden, Rectangle Hanging Vertical Shelf Shower Plant Pot

LaLaGreen Wall Planters - 16 Inch Wall Planters for Indoor Plants, 3 Tier Galvanized Succulent Wall Mounted Planters, Metal Boho Window Herb Garden, Rectangle Hanging Vertical Shelf Shower Plant Pot

(152)
$29.99
FREE delivery Sat, Jun 14 on your first order