Posts

JAVA SQL

select u.* from Categories u order by click desc limit 3 SELECT * FROM `Categories` WHERE `click`<( SELECT MAX(`click`)-2 FROM Categories) ORDER by click DESC SELECT @start := 3, @finish := 10; SELECT * FROM Categories WHERE click BETWEEN @start AND @finish; SELECT COUNT(*) FROM tbl SELECT * FROM Categories WHERE click BETWEEN 4 AND (SELECT COUNT(*) FROM Categories) ORDER BY click DESC; http://www.entityframeworktutorial.net/what-is-entityframework.aspx CRUD : https://www.youtube.com/watch?v=sxrft6sChFw https://www.youtube.com/watch?v=b6vTIiBNcJ0 http://www.aspsnippets.com/Articles/Entity-Framework-CRUD-Select-Insert-Edit-Update-Delete-using-Entity-Framework-in-ASPNet.aspx https://www.youtube.com/watch?v=K4x6eoG7hwY http://www.entityframeworktutorial.net/Querying-with-EDM.aspx

What is Entity Framework?

http://www.entityframeworktutorial.net/Querying-with-EDM.aspx Querying with EDM: We have created EDM, DbContext, and entity classes in the previous sections. Here, you will learn the different types of queries an entity framework supports, which is in turn converted into SQL query for the underlaying database. Entity framework supports three types of queries: 1) LINQ to Entities, 2) Entity SQL, and 3) Native SQL LINQ to Entities: Language-Integrated Query (LINQ) is a powerful query language introduced in Visual Studio 2008. You can use LINQ in C# or Visual Basic to query different data sources. LINQ-to-Entities operates on entity framework entities to access the data from the underlying database. You can use LINQ method syntax or query syntax when querying with EDM. Visit  LINQ Tutorials  to learn LINQ step-by-step. LINQ Method syntax: //Querying with LINQ to Entities using ( var context = new SchoolDBEntities ()) { var L2EQuery = context...

SQL Joins with C# LINQ

Image
http://www.dotnettricks.com/learn/linq/sql-joins-with-csharp-linq There are  Different Types of SQL Joins  which are used to query data from more than one tables. In this article, I would like to share how joins work in LINQ. LINQ has a JOIN query operator that provide SQL JOIN like behavior and syntax. Let's see how JOIN query operator works for joins. This article will explore the SQL Joins with C# LINQ. INNER JOIN LEFT OUTER JOIN CROSS JOIN GROUP JOIN The JOIN query operator compares the specified properties/keys of two collections for equality by using the EQUALS keyword. By default, all joins queries written by the JOIN keyword are treated as equijoins. LINQ PAD for running and debugging LINQ Query I am a big fan of LINQ Pad since it allow us to run LINQ to SQL and LINQ to Entity Framework query and gives the query output. Whenever, I need to write LINQ to SQL and LINQ to Entity Framework query then, I prefer to write and run query on LINQ PAD....

LINQ Tutorials

LINQ Tutorials What is LINQ Why LINQ LINQ API LINQ Query Syntax LINQ Method Syntax Lambda Expression Standard Query Operators Where OfType OrderBy ThenBy GroupBy, ToLookup Join GroupJoin Select All, Any Contains Aggregate Average Count Max Sum ElementAt, ElementAtOrDefault First, FirstOrDefault Last, LastOrDefault Single, SingleOrDefault SequenceEqual Concat DefaultIfEmpty Empty, Range, Repeat Distinct Except Intersect Union Skip, SkipWhile Take, TakeWhile Conversion Operators Expression Expression Tree Deferred Execution Immediate Execution let Keyword into Keyword Sample Queries Useful Resources
select u.* from Categories u order by click desc limit 3 SELECT * FROM `Categories` WHERE `click`<( SELECT MAX(`click`)-2 FROM Categories) ORDER by click DESC CRUD :  http://www.entityframeworktutorial.net/what-is-entityframework.aspx CRUD : https://www.youtube.com/watch?v=sxrft6sChFw https://www.youtube.com/watch?v=b6vTIiBNcJ0 http://www.aspsnippets.com/Articles/Entity-Framework-CRUD-Select-Insert-Edit-Update-Delete-using-Entity-Framework-in-ASPNet.aspx https://www.youtube.com/watch?v=K4x6eoG7hwY Linq QUERY http://www.entityframeworktutorial.net/Querying-with-EDM.aspx http://www.dotnettricks.com/learn/linq/sql-joins-with-csharp-linq http://www.entityframeworktutorial.net/what-is-entityframework.aspx http://www.tutorialsteacher.com/linq/linq-tutorials