Entity Framework & LINQ (Language Integrated Query)

Slides:



Advertisements
Similar presentations
Svetlin Nakov Director Training and Consulting Activities National Academy for Software Development (NASD) ASP.NET 3.5 New Features.
Advertisements

.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
Query Methods (SQL). What is SQL A programming language for databases. SQL (structured Query Language) It allows you add, edit, delete and run queries.
AXC01 DIXF: The Microsoft Dynamics AX Data Import and Export Framework
Building a Complete Web Application Using ASP.NET 3.5 & Visual Studio 2008 (Part 1 of 2) Jeff King Program Manager Microsoft Corporation
©2012 Microsoft Corporation. All rights reserved..
Discover, Master, InfluenceSlide 1 SQL Server Compact Edition and the Entity Framework Rob Sanders Readify.
Overview of Database Access in.Net Josh Bowen CIS 764-FS2008.
From VS C# 2010 Programming, John Allwork 1 VS2010 C# Programming - DB intro 1 Topics – Database Relational - linked tables SQL ADO.NET objects Referencing.
Object and object-relational databases 1. Object databases vs. Object-relational databases Object databases Stores complex objects – Data + functions.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
LINQ Programming in C# LINQ CSE Prof. Roger Crawfis.
Entity Framework Code First End to End
BIT 286: Web Applications Lecture 04 : Thursday, January 15, 2015 ASP.Net MVC - Models.
CS1100: Access Reports A (Very) Short Tutorial on Microsoft Access Report Construction Created By Martin Schedlbauer With contributions from Matthew Ekstrand-Abueg.
Intro to Entity Framework By Shahed Chowdhuri Don’t drown in database design during WakeUpAndCode.com.
Entity Framework MIS 324 MIS 324 Professor Sandvig Professor Sandvig.
NHibernate in Action Web Seminar at UMLChina By Pierre Henri Kuaté 2008/08/27
Chapter 15: Using LINQ to Access Data in C# Programs.
Codeigniter is an open source web application. It occupies a very small amount of space in the memory and is most useful for developers who aim to develop.
ADO.NET DATA SERVICES Mike Taulty Developer & Platform Group Microsoft UK
Overview of Data Access MacDonald Ch. 15 MIS 324 Professor Sandvig.
Part 04 – Preparing to Deploy to the Cloud Entity Framework and MVC Series Tom Perkins NTPCUG.
Introduction to Entity Framework Part 2 CRUD Scaffolding Tom Perkins NTPCUG.
Introduction to LINQ Lecture # 19 August Introduction How do you interrogate/manipulate data? What if you could do the work in a type-safe," string-free.
1 Hammad Khan. COURSE CONTENTS.NET Framework And C# SQL Server 2008 ADO.NET LINQ ASP.NET Dynamics Data ASP.NET MVC framework 2 Advance C# Concepts Windows.
Lap Around Visual Studio 2008 &.NET 3.5 Enhancements.
Objectives In this lesson, you will learn to: *Identify the need for ADO.NET *Identify the features of ADO.NET *Identify the components of the ADO.NET.
Building Secure Web Applications With ASP.Net MVC.
Oct * Brad Tutterow. VS 2008.NET 3.5LINQ Entity Framework  The ADO.NET Entity Framework is part of Microsoft’s next generation of.NET technologies.
EntityFrame work and LINQ CH 14. linq LINQ enables you to query data from a wide variety of data sources, directly from your programming code. LINQ is.
Data Access Layer Shahed Chowdhuri Using Code-First Migrations.
All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research.
Language Integrated Query Mike Taulty Developer & Platform Group Microsoft Ltd
Visual Basic 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
Entity Framework Database Connection with ASP Notes from started/getting-started-with-ef-using-mvc/creating-an-
BIT 286: Web Applications ASP.Net MVC. Objectives Applied MVC overview Controllers Intro to Routing Views ‘Convention over configuration’ Layout files.
1 Adding a Model. We have created an MVC web app project Added a controller class. Added a view class. Next we will add some classes for managing movies.
Building Complete Web Application Using ASP.NET 3.5 & Visual Studio 2008 Omar Khan Group Program Manager Visual Studio.
Introduction to.NET Florin Olariu “Alexandru Ioan Cuza”, University of Iai Department of Computer Science.
© 2016, Mike Murach & Associates, Inc.
Introducing the Microsoft® .NET Framework
Part 1: Overview of LINQ Intro to LINQ Presenter: PhuongNQK.
Introduction to .NET Florin Olariu
Introduction to Entity Framework
VB 2010 Pertemuan 10.
LINQ for SQL SQL Saturday May 2009 David Fekke.
Overview of Data Access
Entity Framework By: Casey Griffin.
ASP.NET 3.5 Mike Ormond Developer & Platform Group Microsoft Ltd
Learn. Imagine. Build. .NET Conf
ADO.NET Entity Framework
Overview of Data Access
…and web frameworks in general
SQL Server Data Tools Gert Drapers
MIS Professor Sandvig MIS 324 Professor Sandvig
An Introduction to Entity Framework
MIS Professor Sandvig MIS 324 Professor Sandvig
Entity Framework Core (EF Core)
Using Visual Studio Visual Studio භාවිතය
MIS Professor Sandvig MIS 324 Professor Sandvig
IT College 2016, Andres käver
…and web frameworks in general
Implementing Entity Framework with MVC Jump Start
Topic 12 Lesson 2 – Retrieving Data with Queries
ADO.NET Entity Framework
Visual Studio 2010 and .NET Framework 4 Training Workshop
.NET Framework V3.5+ & RESTful web services
PNW SQL Users Group August 10th, 2011
MIS Professor Sandvig MIS 324 Professor Sandvig
Presentation transcript:

Entity Framework & LINQ (Language Integrated Query) MIS 324 -- Professor Sandvig 7/26/2019 Entity Framework & LINQ (Language Integrated Query) MIS 324 Professor Sandvig

MIS 324 -- Professor Sandvig 7/26/2019 Outline Entity Framework Model generation Scaffolding Controllers & views LINQ Language integrated query

What is Entity Framework MIS 324 -- Professor Sandvig 7/26/2019 What is Entity Framework Short version: Code-less CRUD web interface Microsoft’s ORM (object relation mapper) Wizards create model, controller, views from database

What is Entity Framework Dapper lightweight ORM Fast Uses standard SQL queries EF is ORM + code writing wizards

EF Model Examines database Example: Generates model of database tables Database with three tables VS: Add  New Item  ADO.NET Entity Data Model

EF Controller & Views VS: Add > New Scaffolded Item Generates: Controller with CRUD methods Views for CRUD

EF Controller & Views Run Scaffolding wizard for each table CRUD Interface

Entity Framework VS wizards: Create models from database Create database from model Create model and database from db.model Create MVC controller and views from models

Entity Framework Very convenient Scaffolding wizard generates: Controller Views Time: minutes instead of hours Can add validation, customize view, etc.

LINQ Language Integrated Query Used by Entity Framework Alternative to SQL Select, sort, filter, etc. Used by Entity Framework Eliminates disconnect between database & code

MIS 324 -- Professor Sandvig 7/26/2019 LINQ - Intellisense We have data models Same as database LINQ examines models Provides Intellisense for writing queries

LINQ SQL Comparison Example: Sql: LINQ string sql = "select Id, Fname, Lname, street, city, state from students where id = @Id"; Execute query and map query results to model LINQ Student student = db.Students.Find(id);

LINQ - Intellisense See Student LINQ Controller handout

LINQ LINQ can query many collection types:

MIS 324 -- Professor Sandvig 7/26/2019 Drawbacks Microsoft propriety technology Not useful outside MS universe LINQ query syntax different than SQL Better in some ways Synchronization between database and entity objects Change database Rebuild entity objects

HW 1 Tutorial HW 1: Getting Started with Entity Framework 6 Database First using MVC 5 Steps: Create database with three tables: Students, courses, enrollments Create EF model with wizard Create controllers and view with wizard

Summary Entity Framework Very handy for CRUD operations VS wizards create: Models Controllers Views