Displaying and Editing Data by Using the Entity Framework and Data Binding Fehim Korhan YAMAN 2008514024.

Slides:



Advertisements
Similar presentations
Page 1 | Microsoft Work With Depth Data Kinect for Windows Video Courses Jan 2013.
Advertisements

ADO.NET Entity Framework
Software development. Chapter 8 – Advanced Topics.
Work With Skeleton Data
Page 1 | Microsoft Work With Color Data Kinect for Windows Video Courses Jan 2013.
30 April 2014 Building Apps for Windows Phone 8.1 Jump Start WinRT Apps & Silverlight.
Chapter 18 Databases and LINQ Visual C# 2010 How to Program © by Pearson Education, Inc. All Rights Reserved.
Entity Framework, a quickstart Florin−Tudor Cristea, Microsoft Student Partner.
Entity Framework MIS 324 MIS 324 Professor Sandvig Professor Sandvig.
Chapter 15: Using LINQ to Access Data in C# Programs.
Data Binding to Controls Programming in C# Data Binding to Controls CSE 494R (proposed course for 459 Programming in C#) Prof. Roger Crawfis.
Database Programming Dr. John Abraham. Data Sources Data source specifies the source of the data for an application. Click on Data from Menu Choose show.
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.
Uwe Habermann Venelina Jordanova Usage of VFP code in the back- end of Silverswitch applications.
© Satyam Computer Services Ltd POC Architecture 1 Confidential – Limited Circulation.
 Scott Hanselman Principal Program Manager Community Liaison Microsoft Corporation TL49.
Lecture 16: Multithreaded Programming. public partial class Form1 : Form { Thread ct; Thread rt; public static int circle_sleep = 0; public static int.
Svetlin Nakov Telerik Corporation
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
“ WinFS” Future Directions: Building Data-Centric Applications Using Windows Presentation Foundation “Avalon” and Windows Forms Ramesh Nagarajan DAT310.

IAsyncResult ar = BeginSomething(…); // Do other work, checking ar.IsCompleted int result = EndSomething(ar);
All information's of PLINQO in this Document, I got it from: So, you could visit the link above to research.
Windows 10 UWP MVVM In Depth
WebClient client; 10 // Constructor public MainPage() { InitializeComponent(); client = new WebClient(); client.DownloadStringCompleted.
1 Low Level ADO.NET Operations II Microsoft Visual C# 2008 Step by Step Chapter 25.
private void page2Button_Click(object sender, RoutedEventArgs e) { NavigationService.Navigate(new Uri("/PageTwo.xaml", UriKind.RelativeOrAbsolute));
Data in Windows 10 UWP Andy Wigley XML, JSON, SQLite or EF Core ?
Introduction to.NET Florin Olariu “Alexandru Ioan Cuza”, University of Iai Department of Computer Science.
© 2016, Mike Murach & Associates, Inc.
Part 1: Overview of LINQ Intro to LINQ Presenter: PhuongNQK.
INTRODUCTION TO DATABASES (MICROSOFT ACCESS)
Microsoft Visual Basic 2010: Reloaded Fourth Edition
Visual Basic 2010 How to Program
Florida Technical College
Recap Modules: dependency management, revisioning, information hiding
Entity Framework Performance
Social Media And Global Computing Managing Databases with MVC
Chapter 7 - Methods Outline Note: Inconsistent with textbook subsection numbering […] 7.13 Recursion […]
Language Integrated Query: (LINQ) An introduction
LiNQ SQL Saturday David Fekke.
Top 10 mistakes developers do with modern applications
ADO.NET Accessing Databases in VS.NET
Data Structures and Database Applications Managing Databases with MVC
Databases and Information Management
MUTENESS ASSİSTMENT 1)WHY CHOICE ? 2)ABOUT DESİGN 3)WHICH CODES USING
Using Access to Implement a Relational Database
Code for WPF.
CSCI 3328 Object Oriented Programming in C# Chapter 8: LINQ and Generic Collections UTPA – Fall 2012 This set of slides is revised from lecture slides.
Social Media And Global Computing Managing MVC with Custom Models
JavaScript Reserved Words
Databases and Information Management
BEAN!.
Ашық сабақ 7 сынып Файлдар мен қапшықтар Сабақтың тақырыбы:
Windows басқару элементтері
Ward Bell VP Technology IdeaBlade, Inc.
Word Lesson 6.
Visual Studio + SQL Server Is Better
Презентация құру тәсілдері
Chapter 13: Handling Events
Қош келдіңіздер!.
ADO.NET Entity Framework
Информатика пән мұғалімі : Аитова Карима.
LINQ to SQL Part 3.
Microsoft Access Date.
Visual Studio 2008.
Advanced .NET Programming I 6th Lecture
CS4540 Special Topics in Web Development Course Overview
Chengyu Sun California State University, Los Angeles
Presentation transcript:

Displaying and Editing Data by Using the Entity Framework and Data Binding Fehim Korhan YAMAN 2008514024

Entity Framework and Data Model Entity Framework is a technology that is used for querying and manipulating databases. Entity data model is a logical model of a database. We use the entity framework to generate a logical data model.

Retrieving Information and Establishing the Data Bindings using System.ComponentModel; using System.Collections; public partial class SupplierInfo : Window { private NorthwindEntities northwindContext = null; private Supplier supplier = null; private IList productsInfo = null; ... }

Retrieving Information and Establishing the Data Bindings private void Window_Loaded(object sender, RoutedEventArgs e) { this.northwindContext = new NorthwindEntities(); suppliersList.DataContext = this.northwindContext.Suppliers; } private void suppliersList_SelectionChanged(object sender, SelectionChangedEventArgs e) this.supplier = suppliersList.SelectedItem as Supplier; this.northwindContext.LoadProperty<Supplier>(this.supplier, s => s.Products); this.productsInfo = ((IListSource)supplier.Products).GetList(); productsList.DataContext = this.productsInfo;

Using LINQ to Entities to Query Data NorthwindEntities northwindContext = new NorthwindEntities(); ObjectQuery<Product> products = northwindContext.Products; var productNames = from p in products select p.ProductName; foreach (var name in productNames) { Console.WriteLine("Product name: {0}", name); }

Using Data Binding for Data editing NorthwindEntities northwindContext = new NorthwindEntities(); try { Product product = northwindContext.Products.Single(p => p.ProductID == 14); product.ProductName = "Bean Curd"; northwindContext.SaveChanges(); } catch (OptimisticConcurrencyException ex) northwindContext.Refresh(RefreshMode.ClientWins, northwindContext.Products);

QUESTIONS?

References Microsoft Visual C# 2010 Step by Step