browse.develop.com
Browse.develop.com is a community that was established to collect and organize valuable web information. Our technical staff have selected and indexed information and courses that they feel will help you stay current on best practices across the SDLC.

32 Articles match "LINQ"

  • Related DevelopMentor Courses

    32 Results found
    Showing page 1 of 2   Next >

  • Streaming XML using LINQ to XML (continued)
    Richard Blewett reminded me that the XmlReader.ReadSubtree method makes it even easier to use LINQ to XML with a streaming approach. NET LINQThe code sample below will load nodes from an arbitrary XML files and yield them to the caller as they’re read from file: static IEnumerable Load( string filename, string elementName). {. XmlReaderSettings settings = new XmlReaderSettings(); settings.IgnoreWhitespace = true ; using (XmlReader reader = XmlReader.Create(filename, settings)). {. while (reader.ReadToFollowing(elementName)). {. // build element from subtree.
    DevelopMentor Courses - Tuesday, November 1, 2011
  • LINQ: Convert list to a dictionary of lists
    ToDictionary( x => x.Key, x => x.ToList() ); C# LINQSuppose I have a list of time cards from multiple employees, but I want to group them into dictionary, based on the Social Security Number (SSN) of the employee. Here is an example of how to convert a list of items into a dictionary of lists: Dictionary. dict; dict = ( from timecard in listOfTimeCards. group timecard by timecard.SSN ).ToDictionary(
    DevelopMentor Courses - Monday, July 11, 2011
  • Streaming XML
    I just rediscovered this blog post about reading and parsing XML as it becomes available in conjunction with LINQ to XML: [link]. It’s a little dated, but still relevant.
    DevelopMentor Courses - Monday, October 31, 2011
  • What’s new in.NET Framework 4.5
    click for larger version): NET ASP.NET C# LINQ VB.NET WCF WF WPFJust came across this great picture of what’s new in.NET Framework 4.5
    DevelopMentor Courses - Monday, October 31, 2011
  • Logging and tracing with Entity Framework
    Entity Framework LINQIf you’re using the Entity Framework and don’t want to implement ToTraceString() at strategic points in your code in order to see what kind of SQL statements are getting generated then check out one of the following: Community Entity Framework Provider Wrappers (free). link] /. Or use NuGet: Install-Package CommunityEFProviderWrappers.EFTracingProvider. Entity Framework Profiler. link].
    DevelopMentor Courses - Wednesday, June 29, 2011
  • Entity Framework - Model First: One-to-One relationship
    Entity Framework LINQIf you’re doing Model First with Entity Framework you may run into a scenario where you want to design a 1-to-1 relationship, but also have a foreign key be available on your entity. The default behavior in Entity Framework when doing a 1-to-1 relationship (with Model First), or 1-to-0.1 relationship, is to create a foreign key on the 0.1 side of the association but hide the foreign key. better approach is this: Start a new model. Add the entity that goes on the 1 side of the association, give it a primary key of type integer. Add the entity that goes on the 0.1
    DevelopMentor Courses - Wednesday, June 29, 2011
  • Guerrilla.NET (US) Training
    and LINQ and lambda expressions from C# 3.0. LINQ : Use LINQ to access objects, XML, and SQL relational data MVC : Learn the how build modern web applications using ASP.NET MVC 3.0 NoSQL : Build insanely fast, data-driven applications with NoSQL, MongoDB, and LINQ. Learn to write code using new.NET class libraries like LINQ and Silverlight. and LINQ and lambda expressions from C# 3.0. LINQ : Use LINQ to access objects, XML, and SQL relational data MVC : Learn the how build modern web applications using ASP.NET MVC 3.0 and jQuery. and 5.0
    DevelopMentor Courses - Tuesday, March 1, 2011
  • Understanding Map - Reduce
    In fact you could easily rewrite this into a LINQ query like this: 1: private static IEnumerable Map(IEnumerable orders). And in fact that is all there is to a Map process, it is just a LINQ select clause. So just as with the Map process we could easily rewrite this as a LINQ group by query like this: 1: private static IEnumerable Reduce(IEnumerable input). So where the Map process is just a LINQ select the Reduce process is just a LINQ group by with the additional collection that the input type is also the output type. Simple right? Again pretty simple right?
    The Problem Solver - Monday, December 3, 2012
  • Guerrilla.NET (UK) Training
    Along the way we will look at how LINQ can be used to query and manipulate this data. IObservable interface and LINQ to create a compelling new programming model that allows you to build "event" based code with declarative LINQ statements. Leverage new features of C# 4.0, including named and optional parameters and dynamic typing. Understand the new features of the core.NET runtime services including the garbage collector. Use PFx as a unifying library for all your multithreading needs. Parallelize computationally intensive processing using multiple cores/processors.
    DevelopMentor Courses - Tuesday, March 1, 2011
  • Screening C# Candidates: Let’s Play 20 Questions!
    What keyword would you use to define an inline variable in a LINQ query? What keyword would you use to define an inline variable in a LINQ query? Over the past year I was involved in the process of interviewing candidates for both mid and senior level developer positions. We would bring them in for a face-to-face interview, sometimes with multiple interviewers, only to find out they were unable to answer the most basic technical questions concerning C# and.NET. Furthermore, I’m looking for a developer with a thirst for knowledge. This is the purpose of the technical phone screen.
    DevelopMentor Courses - Tuesday, February 28, 2012
  • Maurice de Beijer: Querying RavenDB databases
    If you prefer the full LINQ syntax that is no problem as it produced exactly the same result±. If you try this you might notice one big difference from EntityFramework or in memory LINQ queries. As we have seen in previous blog posts getting data from a RavenDB database is easy. Either use the IDocumentSession.Query () function to load a series of documents or the IDocumentSession.Load () function to load a document using its identity. However sometimes we want more control over what we want to load. As with any query this is easy to correct. 1: public ActionResult Index(). 11: }.
    The Problem Solver - Monday, December 17, 2012
  • Type-Safe Include extension method for Entity Framework
    If you’re interested in the Include method in a LINQ to Entities queries to be type-safe, then Joe Ferner has the answer for you in this post: Type-Safe Entity Framework Include: [link]. Entity Framework
    DevelopMentor Courses - Tuesday, January 24, 2012
  • Simple WCF SOAP-REST Multi-Project Template
    The REST client uses LINQ to XML to parse the response. Download the source code for this post. did it again: another multi-project Visual Studio template – this time for a simple WCF service that exposes both SOAP and REST endpoints. My other REST and SOAP templates are intended as a starting point for more real-world WCF services. However, what I often need is a starting point for building a “proof-of-concept” service in order to explore various configuration options and scenarios. Search for “WCF SOAP-REST” in the Online Gallery, then click Download to install the extension. Enjoy.
    DevelopMentor Courses - Monday, June 11, 2012
  • Essential SQL Azure Training
    LINQ and Entity Framework Entity Framework has become the standard Object Relational Mapper (ORM) for.NET developers. Understand the architecture of SQL Azure Understand how SQL Server Azure handles database connections and disaster recovery Read query plans Assign indexes Use SQL Server Reporting Services (SSRS) in the cloud Understand sharding and federations to build scalable, elastic applications Understand replicating data using data sync between SQL Azure in the cloud and SQL Server on-premise Essential SQL Azure provides hands-on training for SQL Azure developers.
    DevelopMentor Courses - Thursday, May 19, 2011
  • Paging data using AngularJS and RavenDB in the RAW Stack
    Now you can just include a LINQ take() function to add more but even then it would stop at 1024 documents. 'So far loading and displaying some movies data has been pretty simple and straightforward. However something that was not immediately apparent was that not all movies in the database where shown. When opening the movies list there where just 128 movies visible and that was not all there was to show. In fact I have used the Rotten Tomatoes API to preload the database with more than 1000 movies and even though I never added a filter anywhere most of these didn't show up. Try it.
    The Problem Solver - Friday, March 14, 2014
  • Michael Kennedy: Convert LINQ to MongoDB queries to JavaScript shell
    'If you do a lot of work with MongoDB from.NET, this code should look familiar: var query = from p in mongo.People where p.Age > 20 && p.Name.Length >= 2 orderby p.Age descending select p; But could you answer … Continue reading →
    DevelopMentor Courses - Wednesday, March 5, 2014
  • Maurice de Beijer: Understanding Map - Reduce
    In fact you could easily rewrite this into a LINQ query like this: 1: private static IEnumerable Map(IEnumerable orders). And in fact that is all there is to a Map process, it is just a LINQ select clause. So just as with the Map process we could easily rewrite this as a LINQ group by query like this: 1: private static IEnumerable Reduce(IEnumerable input). So where the Map process is just a LINQ select the Reduce process is just a LINQ group by with the additional collection that the input type is also the output type. Simple right? Again pretty simple right?
    DevelopMentor Courses - Monday, December 3, 2012
  • Scott Reed: Repository pattern improvements
    Beyond the Basics • LINQ to Objects and LINQ to XML • Entity Framework • Model-View-ViewModel for WPF and Silverlight • PFx: Task and The Parallel I just finished a Guerrilla.NET in Boston with Michael Kennedy and Mark Smith. Here are the topics we covered. Introduction to WPF and Silverlight • ASP.NET MVC 3.0:
    DevelopMentor Courses - Saturday, May 7, 2011
  • Wallace Kelly: LINQ to Entities, ObjectDisposedException, and Lazy Loading
    Consider this code: List redProducts = null; using (var ctx = new AdventureWorksContext()) { redProducts = ctx.Products.Where(p => p.Color == "Red").ToList(); ToList(); } foreach (var p in redProducts) { Console.WriteLine("{0}: {1}", p.Name, p.ProductCategory.Name); } At run time, I get an exception: Unhandled Exception: System.ObjectDisposedException: The ObjectContext instance has been disposed and can no longer be used for operations that require a connection. Notice that when iterating over the redProducts, I am accessing the ProductCategory navigation property. In Entity Framework 4.0,
    DevelopMentor Courses - Tuesday, January 31, 2012
  • Michael Kennedy: Introducing MongoDB and LINQ at Mongo Seattle 2011
    Here’s a video of a short talk I gave at Mongo Seattle 2011 which is a quick getting started with.NET & MongoDB session. Enjoy! mkennedy PS – Yeah, it’s from last year. forgot to publish it on my … Continue reading →
    DevelopMentor Courses - Thursday, March 1, 2012
<< 1 2 >>
%>