.NET news » Search results

Search results for query "linq" (31):

The Working Programmer: Going NoSQL with MongoDB, Part 3

Wrapping up his examination of MongoDB, Ted Neward discusses predicate queries, aggregate functions and LINQ support, and provides some tips on hosting the NoSQL database in a production environment.
2010-06-28 19:00:00   Source: The Working Programmer: Going NoSQL with MongoDB, Part 3   Tags: Database

XAML: Optimizing C# for XAML Platforms

By carefully examining the code you use in your XAML applications, you can ensure that you make choices that enhance your application’s performance. Understanding the complexity of the dependency property system, the way LINQ uses collections, and the operation of the XAML layout system will help you enable faster retrievals, use loops more efficiently and optimize custom controls.
2012-01-31 17:00:00   Source: XAML: Optimizing C# for XAML Platforms   Tags: C#

C# 3.0 Syntax Additions-Design Guidelines

C# 3.0 includes a few syntactical additions to the language. For the most part, Microsoft added these language additions to support Language Integrated Query (LINQ). These features include (but are not limited to) lambda expressions, extensions methods, anonymous types, implicitly typed local variables, automatic properties, and object initializers.
2007-12-27 18:00:00   Source: C# 3.0 Syntax Additions-Design Guidelines   Tags: C#

What's New in C# 3.0? Part 1

With the release of Visual Studio 2008, Microsoft has updated the C# language to its latest version, 3.0. C# 3.0, contains several key language enhancements that support the recently-announced Language Integrated Query (LINQ) feature. This article, the first of a two-part series, will walk you through each of these new, time-saving language enhancements and provide a couple of code examples illustrating how to use them.
2008-01-24 23:34:57   Source: What's New in C# 3.0? Part 1   Tags: C#

Declarative Data Parallelism Using Parallel LINQ

Applications can be single threaded or multithreaded. A single-threaded application is one in which the processor executes threads in a sequence, i.e., a thread would be scheduled by the operating system only if the execution of the currently running thread is complete. This approach doesn’t provide much system throughput (a measure of the amount of work done in unit time).

LINQ to XML Instead of a Database

When people think of having to store data for their applications, a database such as SQL Server immediately comes to mind. However, XML files are very handy for storing data without the overhead of a database. Using XML files to cache often-used, but seldom changed data such as US state codes, employee types and other validation tables can avoid network roundtrips and speed up your application. In addition, XML files are great for off-line applications where a user needs to add, edit and delete data when they can’t connect to a database.

2012-08-15 18:00:00   Source: LINQ to XML Instead of a Database   Tags: Other

What's New in Visual Studio 2008 and the .NET Compact Framework 3.5

With the release of Visual Studio 2008, Microsoft has also updated the .NET Compact Framework. The .NET Compact Framework 3.5 adds new APIs and, most notably, it now supports the new Language Integrated Query (LINQ) and Windows Communication Foundation (WCF) features that are standard on the .NET Framework (the WCF feature will be covered in more depth in an upcoming article). On the Visual Studio 2008 front, there are new tools to make testing and development work much easier and robust.
2008-01-02 23:03:22   Source: What's New in Visual Studio 2008 and the .NET Compact...   Tags: Mobile

Parallel Computing Concepts via C# 4.0

.NET 4.0 has kept in step with the computing industry's quest for density. There has always been a quest to enhance performance while accomplishing more in a shorter period time period. Parallel LINQ, the Parallel class, the task parallelism constructs, and the concurrent collections are new to Framework 4.0 and are collectively known as PFX (Parallel Framework). The Parallel class together with the task parallelism constructs is called the Task Parallel Library or TPL. This is a necessary addition to .NET is because CPU clock speeds have stagnated and manufacturers have shifted their focus to increasing core counts. This is problematic for us as programmers because our standard single-threaded code will not automatically run faster as a result of those extra cores. That being the case, this article will take a look a parallel programming as done in the C# 4.0 language and the .NET 4.0 runtime.
2010-04-07 21:32:00   Source: Parallel Computing Concepts via C# 4.0   Tags: Performance C#

Sorting a Grid of Data in ASP.NET MVC

Last week's article, Displaying a Grid of Data in ASP.NET MVC, showed, step-by-step, how to display a grid of data in an ASP.NET MVC application. Last week's article started with creating a new ASP.NET MVC application in Visual Studio, then added the Northwind database to the project and showed how to use Microsoft's Linq-to-SQL tool to access data from the database. The article then looked at creating a Controller and View for displaying a list of product information (the Model).

This article builds on the demo application created in Displaying a Grid of Data in ASP.NET MVC, enhancing the grid to include bi-directional sorting. If you come from an ASP.NET WebForms background, you know that the GridView control makes implementing sorting as easy as ticking a checkbox. Unfortunately, implementing sorting in ASP.NET MVC involves a bit more work than simply checking a checkbox, but the quantity of work isn't significantly greater and with ASP.NET MVC we have more control over the grid and sorting interface's layout and markup, as well as the mechanism through which sorting is implemented. With the GridView control, sorting is handled through form postbacks with the sorting parameters - what column to sort by and whether to sort in ascending or descending order - being submitted as hidden form fields. In this article we'll use querystring parameters to indicate the sorting parameters, which means a particular sort order can be indexed by search engines, bookmarked, emailed to a colleague, and so on - things that are not possible with the GridView's built-in sorting capabilities.

Like with its predecessor, this article offers step-by-step instructions and includes a complete, working demo available for download at the end of the article. Read on to learn more!

2010-12-21 18:00:00   Source: Sorting a Grid of Data in ASP.NET MVC   Tags: Build

Displaying a Paged Grid of Data in ASP.NET MVC

This article demonstrates how to display a paged grid of data in an ASP.NET MVC application and builds upon the work done in two earlier articles: Displaying a Grid of Data in ASP.NET MVC and Sorting a Grid of Data in ASP.NET MVC. Displaying a Grid of Data in ASP.NET MVC started with creating a new ASP.NET MVC application in Visual Studio, then added the Northwind database to the project and showed how to use Microsoft's Linq-to-SQL tool to access data from the database. The article then looked at creating a Controller and View for displaying a list of product information (the Model).

Sorting a Grid of Data in ASP.NET MVC enhanced the application by adding a view-specific Model (ProductGridModel) that provided the View with the sorted collection of products to display along with sort-related information, such as the name of the database column the products were sorted by and whether the products were sorted in ascending or descending order. The Sorting a Grid of Data in ASP.NET MVC article also walked through creating a partial view to render the grid's header row so that each column header was a link that, when clicked, sorted the grid by that column.

In this article we enhance the view-specific Model (ProductGridModel) to include paging-related information to include the current page being viewed, how many records to show per page, and how many total records are being paged through. Next, we create an action in the Controller that efficiently retrieves the appropriate subset of records to display and then complete the exercise by building a View that displays the subset of records and includes a paging interface that allows the user to step to the next or previous page, or to jump to a particular page number, we create and use a partial view that displays a numeric paging interface

Like with its predecessors, this article offers step-by-step instructions and includes a complete, working demo available for download at the end of the article. Read on to learn more!

2011-01-04 18:00:00   Source: Displaying a Paged Grid of Data in ASP.NET MVC   Tags: Visual Studio