Building Web Applications with Microsoft ASP

Slides:



Advertisements
Similar presentations
Extension Methods, Anonymous Types LINQ Query Keywords, Lambda Expressions Svetlin Nakov Telerik Corporation
Advertisements

METHOD OVERRIDING 1.Sub class can override the methods defined by the super class. 2.Overridden Methods in the sub classes should have same name, same.
.NET 3.5 – Mysteries. NetFx Evolution NetFx 1.0 C# 1.0, VB 7.0, VS.NET NetFx 1.1 C# 1.1, VB 7.1, VS 2003 NetFx 2.0 C# 2.0, VB 8.0, VS 2005 NetFx 3.0 C#
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Objects and Classes First Programming Concepts. 14/10/2004Lecture 1a: Introduction 2 Fundamental Concepts object class method parameter data type.
C# Programming: From Problem Analysis to Program Design1 Advanced Object-Oriented Programming Features C# Programming: From Problem Analysis to Program.
2.3 Cool features in C# academy.zariba.com 1. Lecture Content 1.Extension Methods 2.Anonymous Types 3.Delegates 4.Action and Func 5.Events 6.Lambda Expressions.
C# 3.0 and LINQ Pavel Yosifovich CTO, Hi-Tech College
Java CourseWinter 2009/10. Introduction Object oriented, imperative programming language. Developed: Inspired by C++ programming language.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
Eric Vogel Software Developer A.J. Boggs & Company.
Putting it all together: LINQ as an Example. The Problem: SQL in Code Programs often connect to database servers. Database servers only “speak” SQL. Programs.
Extension Methods, Anonymous Types LINQ Query Keywords, Lambda Expressions Based on material from Telerik Corporation.
Introduction to C# C# is - elegant, type-safe, object oriented language enabling to build applications that run on the.NET framework - types of applications.
Tuc Goodwin  Object and Component-Oriented Programming  Classes in C#  Scope and Accessibility  Methods and Properties  Nested.
Features of Object Oriented Programming:  A class is a collection of things which posses common similarities.  In C#.NET a class is a user defined.
Session 08 Module 14: Generics and Iterator Module 15: Anonymous & partial class & Nullable type.
Hoang Anh Viet Hà Nội University of Technology Chapter 1. Introduction to C# Programming.
C# 3.0 and LINQ Pavel Yosifovich CTO, Hi-Tech College
CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Advanced.NET Programming I 10 th Lecture Pavel Ježek
Introduction to Object-Oriented Programming Lesson 2.
Satisfy Your Technical Curiosity C# 3.0 Raj Pai Group Program Manager Microsoft Corporation
From C++ to C# Part 5. Enums Similar to C++ Similar to C++ Read up section 1.10 of Spec. Read up section 1.10 of Spec.
IAP C# 2011 Lecture 2: Delegates, Lambdas, LINQ Geza Kovacs.
Support standard JavaScript code with static typing Encapsulation through classes and modules Support for constructors, properties and.
Presented by Ted Higgins, SQL Server DBA An Introduction to Object – Oriented Programming.
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
Chapter 11.  Large amounts of data are often stored in a database—an organized collection of data.  A database management system (DBMS) provides mechanisms.
C# Programming: From Problem Analysis to Program Design1 Creating Your Own Classes C# Programming: From Problem Analysis to Program Design 4th Edition.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
Introduction to.NET Florin Olariu “Alexandru Ioan Cuza”, University of Iai Department of Computer Science.
Building Web Applications with Microsoft ASP
Part 1: Overview of LINQ Intro to LINQ Presenter: PhuongNQK.
Building Web Applications with Microsoft ASP
Objects as a programming concept
Classes (Part 1) Lecture 3
C# - OOP TTU IT College , Autumn SEMESTER Andres käver.
Examples of Classes & Objects
2.7 Inheritance Types of inheritance
Module 5: Common Type System
Delegates and Events 14: Delegates and Events
LiNQ SQL Saturday David Fekke.
Upgrading Your C# Programming Skills to Be a More Effective Developer
Building Web Applications with Microsoft ASP
Microsoft .NET 3. Language Innovations Pan Wuming 2017.
Array Array is a variable which holds multiple values (elements) of similar data types. All the values are having their own index with an array. Index.
Generics, Lambdas, Reflections
CS360 Windows Programming
.NET and .NET Core: Languages, Cloud, Mobile and AI
Lecture 23 Polymorphism Richard Gesick.
.NET and .NET Core 5.2 Type Operations Pan Wuming 2016.
.NET and .NET Core 9. Towards Higher Order Pan Wuming 2017.
6 Delegate and Lambda Expressions
Classes & Objects: Examples
Functions, Part 1 of 3 Topics Using Predefined Functions
Chapter 8 Classes User-Defined Classes and ADTs
Functions, Part 1 of 3 Topics Using Predefined Functions
CIS 199 Final Review.
Building Web Applications with Microsoft ASP
Building Web Applications with Microsoft ASP
C# - EF Core Intro IT College, Andres Käver, , Fall semester
5. 3 Coding with Denotations
C# - Razor Pages Db/Scaffolding/Async
ADO.NET Entity Framework
Functions, Part 1 of 3 Topics Using Predefined Functions
IT College 2016, Andres käver
Advanced .NET Programming I 6th Lecture
Corresponds with Chapter 5
Chengyu Sun California State University, Los Angeles
Generics, Lambdas and Reflection
Presentation transcript:

Building Web Applications with Microsoft ASP Building Web Applications with Microsoft ASP.NET - I376 Web Application Programming II – I713 IT College, Andres Käver, 2016-2017, Spring semester Web: http://enos.Itcollege.ee/~akaver/ASP.NETCore Skype: akaver Email: akaver@itcollege.ee

C# - Interfaces Interfaces, like classes, define a set of properties, methods, and events. But unlike classes, interfaces do not provide implementation. They are implemented by classes, and defined as separate entities from classes. An interface represents a contract, in that a class that implements an interface must implement every aspect of that interface exactly as it is defined. Most of modern oop programming is based on interfaces!

C# - Interfaces Interfaces members are public You have to implement every method in interface Abstract class can use interfaces Convention – all interfaces start with capital letter I You can implement more than one interface interface ISampleInterface { void DoSomething(); } class SampleClassWithInterface : ISampleInterface public void DoSomething() throw new NotImplementedException();

C# - Generics Classes, structures, interfaces and methods in the .NET Framework can include type parameters that define types of objects that they can store or use. The most common example of generics is a collection, where you can specify the type of objects to be stored in a collection. public class SampleGeneric<T> { public T Field; } SampleGeneric<string> sampleObject = new SampleGeneric<string>(); sampleObject.Field = "Sample string";

C# - Delegates A delegate is a type that defines a method signature, and can provide a reference to any method with a compatible signature. You can invoke (or call) the method through the delegate. Delegates are used to pass methods as arguments to other methods.

C# - Delegates public delegate void SampleDelegate(string str); class SampleClassDelegate { // Method that matches the SampleDelegate signature. public static void SampleMethod(string message) // Add code here. } // Method that instantiates the delegate. void SampleDelegate() SampleDelegate sd = SampleMethod; sd("Sample string");

C# - Extension methods Extension methods enable you to "add" methods to existing types without creating a new derived type. public static class MyExtensions { public static int WordCount(this String str) return str.Split(new[] { ' ', '.', '?' }, StringSplitOptions.RemoveEmptyEntries).Length; } string s = "Hello Extension Methods"; int i = s.WordCount();

C# - Linq method query var list1 = context.People.Where(p => p.FirstName == "Andres").OrderBy(o => o.LastName).Take(5); Take the table People On every row, do some operation Declare variable p (one row from People) – strongly typed Write the lambda expression to be executed on every row Result is new set, with only those rows that match criteria On every row, do some operation (OrderBy) On every row, do some operatiom (Take)

Linq query expression var list2 = (from p in context.People where p.FirstName == "Andres" orderby p.LastName select p).Take(5); Exactly the same result C# will transform them to lambdas Harder to read Slower