Download Source Code and Handon
Last Sunday Linq Session At sir syed university
Thursday, January 20, 2011
Posted by Usama Wahab Khan at 2:04 AM 0 comments
Labels: linq, Usama wahab khana
C# Language Basics
Tuesday, August 24, 2010
- Working With Numbers
- Dates and Times
- Conditional Logic
- Compare Operators
- Loops
- Defi ne New Types
- fields
- properties
- methods
- constructors
- Inheritance
- override inherited method
- call base class version
- Working with XML
- Load an XML fi le
- Working With Text
- Create a text file
- Read from a text fi le
- Working With a Database
- insert a record
- read records
- read a single value
- linq
- Dynamic DataType and expandoObject
- Optional Parameter
- Parallel Programing
- Parallel For Loop
- PLINQ















Posted by Usama Wahab Khan at 10:20 PM 2 comments
Labels: C#, dotnet 4.0, linq
Entity Framework with Linq CRUD Operation Example
Friday, June 25, 2010
Posted by Usama Wahab Khan at 11:54 AM 2 comments
Labels: Asp.net, entityframework, linq, visual Studio 2010
Simple DataBind in Silverlight
Tuesday, January 12, 2010

ADO.Net Classe is Absent in Silverlight That why some time Developer get confused How Retrieve Data in Silvrelight Application? Silverlight Provide ServiceModel Class You Thought this Class You can Call Web services ,WCF Services , RIA Services, Syndication (Rss,Atom) To Get Data. For Communicate with Data Base Web Prefer to Use Entity Framework Or We Can Use Linq to Sql, ADo.net Also through Services . Here i am try to Retrieve Data form Sql in my DataGridControl

Posted by Usama Wahab Khan at 10:25 PM 2 comments
Labels: Databinding, entityframework, linq, Silverlight
SEO Support in Asp.net 4.0 Matedata and Page Ruting
Friday, November 13, 2009


or get more Visitor, Normally Search engines bot scan pages like mysite.com\asp you site and save you meta specially Keywords . but mostly the did get dynamic pages we were crated by the help of qureystring like mysite.com\MobileProduct.aspx?Product="Mobile" . Before asp.net 4.0 where were generate Metadata like Dynamic Keywords,Description,Title , for dynamic website like shopping cart there were hundreds
Product in database but u Search Engg only listed those pages those were query Now in asp.net 4.0 we had solution all of these problems we can resistor Our dynamic Pages with the help of asp.net 4.0 feature called Page Routing it has been introduce in Asp.net MVC now you can use this feature in asp.net-4.0 here i try to create one demo application where i had Products, Category's i will care Product page and route them and each page have dynamically generate keyword,title metadata

2. Right click on App_data folder add northwinds database from sample crate linq to sql add table and view

3 add gridview and set template like this on default.aspx
set sqldatasorce with wizard connectionstring >select columns [CategoryName], [Description], [CategoryID], [Picture] FROM table[Categories]
its will look like this
4.add gridview on categories.aspx
5. add sqldatasorce wizard for girdview ConnectionString>Select view Alphabetical list of products and columns ProductName, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued click on where button you will route option like this
Posted by Usama Wahab Khan at 10:10 PM 2 comments
Labels: Asp.net, Asp.net 4.0, dotnet 4.0, linq, visual Studio 2010
Asp.net Databind With Linq & linq to Sql
Sunday, September 6, 2009
LINQ: .NET Language-Integrated Query 3 set there id girdView to Gvlinq and Button1 to btnbinding
After two decades, the industry has reached a stable point in the evolution of object-oriented (OO) programming technologies. Programmers now take for granted features like classes, objects, and methods. In looking at the current and next generation of technologies, it has become apparent that the next big challenge in programming technology is to reduce the complexity of accessing and integrating information that is not natively defined using OO technology. The two most common sources of non-OO information are relational databases and XML.
Rather than add relational or XML-specific features to our programming languages and runtime, with the LINQ project we have taken a more general approach and are adding general-purpose query facilities to the .NET Framework that apply to all sources of information, not just relational or XML data. This facility is called .NET Language-Integrated Query (LINQ).
We use the term language-integrated query to indicate that query is an integrated feature of the developer's primary programming languages (for example, Visual C#, Visual Basic). Language-integrated query allows query expressions to benefit from the rich metadata, compile-time syntax checking, static typing and IntelliSense that was previously available only to imperative code. Language-integrated query also allows a single general purpose declarative query facility to be applied to all in-memory information, not just information from external sources.
.NET Language-Integrated Query defines a set of general purpose standard query operators that allow traversal, filter, and projection operations to be expressed in a direct yet declarative way in any .NET-based programming language. The standard query operators allow queries to be applied to any IEnumerable
The extensibility of the query architecture is used in the LINQ project itself to provide implementations that work over both XML and SQL data. The query operators over XML (LINQ to XML) use an efficient, easy-to-use, in-memory XML facility to provide XPath/XQuery functionality in the host programming language. The query operators over relational data (LINQ to SQL) build on the integration of SQL-based schema definitions into the common language runtime (CLR) type system. This integration provides strong typing over relational data while retaining the expressive power of the relational model and the performance of query evaluation directly in the underlying store.
Object Relational Designer (O/R Designer)
The Object Relational Designer (O/R Designer) provides a visual design surface for creating LINQ to SQL entity classes and associations (relationships) that are based on objects in a database. In other words, the O/R Designer is used to create an object model in an application that maps to objects in a database. It also generates a strongly-typed DataContext that is used to send and receive data between the entity classes and the database. The O/R Designer also provides functionality to map stored procedures and functions to DataContext methods for returning data and populating entity classes. Finally, the O/R Designer provides the ability to design inheritance relationships between entity classes.
Tutorial
1 open Vs 2008 and Create new website2 Drag n Drop on Form Button and GridView Control From ToolBar
4 Right Click on Solution Explorer click on Add newitem and Select linq to sql
5 Open Server Explorer and Drag and drop any table form Database if u did`nt Created at yat so Sample database is available in Sorcecode copy from there
6 goback to default.aspx and double Click on button
and write code blow
DataClasses1DataContext db = new DataClasses1DataContext();
var qury = from c in db.Public_Registrations
select c;
GvLinq.DataSource = qury;
GvLinq.DataBind();
Posted by Usama Wahab Khan at 10:07 PM 0 comments
Labels: Asp.net, Databinding, linq