Showing posts with label LINQ. Show all posts
Showing posts with label LINQ. Show all posts

Wednesday, March 19, 2014

Link to Elastic with ElasticLINQ

Brad Wilson - Getting Started with ElasticLINQ

Jim Newkirk and I have been doing xUnit.net for 7 years now (and for Jim, NUnit for many years before that). You could say that open source is part of our blood, and when we left Microsoft, we made sure that open source would continue to be part of our daily efforts at Tier 3.

Fast forward 15 months: Tier 3 has been acquired (and is now the CenturyLink Cloud Development Center), and our first major open source effort Iron Foundry has been accepted into the Cloud Foundry Incubator project. Lots of great developers are working to ensure that you can write .NET code against a Platform-as-a-Service stack that doesn't lock you into a specific vendor.

Today we are proud to announce our second major open source effort: ElasticLINQ.

What is ElasticLINQ?

One of the major challenges when writing distributed software is how to distribute the data. When I started here 15 months ago, we had 4 data centers, and plans to expand into several more over the coming year. The data was being stored primarily in Microsoft SQL Server. As our data center footprint grew, it was becoming clear that centralized data storage was not going to scale with us. Having islands of data means that your application (and your users) can end up spending a lot of time waiting for data requests to go halfway around the world; and if there are any network glitches along the way, you might even fail to get the data entirely.

Almost right away we started evaluating alternatives that would let us keep all the data locally. We decided to use Couchbase as our primary data store, based on its extremely strong Cross Data-Center Replication (XDCR) capabilities. Many object data storage systems end up paired with an index engine for comprehensive searching capabilities. Couchbase provides an indexing integration solution with Elasticsearch, a horizontally scalable wrapper around Lucene.

The Lucene query syntax is based on JSON; ElasticSearch documents are also stored as JSON. Our developers, steeped in the worlds of .NET and SQL Server, were much more comfortable using the Language Integrated Query (LINQ) functions introduced in .NET 3.5.

ElasticLINQ bridges these two worlds by letting us query Elasticsearch using LINQ, and have the results projected into CLR types. We enlisted the expertise of Damien Guard (of Attack Pattern), who worked on both the LINQ to SQL and Entity Framework teams, to do the initial version of ElasticLINQ for us.

How do I use ElasticLINQ?

Connection and Context ...

Querying with the Context ...

Full-text searching ...

Custom queries with ElasticMethods ...

image

Custom queries and projections with ElasticFields ...

What's next?

This is v1.0 software, so we have a lot left that we can do. We've just recently started using this in our production code, and we are constantly finding new things we want to support. We expect you will come up with things we never dreamed of, too.

We are excited for the community to start using and contributing to ElasticLINQ. The Github site is a work in progress. Soon we will get documentation posted to the Wiki pages on the site, and get a real home page set up. We are anxiously awaiting the first community contributed bugs, Wiki edits, and pull requests.

We hope you love using ElasticLINQ as much as we do!

...

Got to love LINQ Love! :)

Now if only I knew something, anything about Elastic... :/

Tuesday, February 18, 2014

101 [+ 7] C# LINQ samples, one project...

Visual Studio Gallery - MSDN 108 C# LINQ Samples Consolidated with Single Project

image

All MSDN LINQ 101 Samples and few more samples consolidated to Single project and given required comments for each topic...

...

Targeted Audience:

1. .NET Architects

2. .NET Application Designers

3. .NET Application Developers

Prerequisites:

1. .Net technologies.

2. Basic understanding of design patterns.

3. Basic understanding of OOPS.

Description:

All MSDN LINQ 101 Samples and few more samples consolidated to Single project and given required comments for each topic.

1. Open Solution.

2. Right click on the project and select Manage NuGet.

3. Select missing packages and Add

4. Run the application

Topics Covered:

1. Restriction Operators

2. Projection Operators

3. Partitioning Operators

4. Ordering Operators

5. Grouping Operators

6. Set Operators

7. Conversion Operators

8. Element Operators

9. Generation Operators

10. Quantifiers

11. Aggregate Operators

12. Custom Sequence  Operators

13. Query Execution  Operators

14. Join  Operators

15. Miscellaneous Operators

Sometimes it's just easier to have it local. And if you're using a cool code indexer like Sando (and) then finding that right snip is even easier...

BTW, here's the original/source, 101 LINQ Samples.

 

Related Past Post XRef:
An oldie but a goodie, 101 LINQ Samples (C# and VB)

Sunday, August 04, 2013

[Book Review] "Building Interactive Queries with LINQPad"

As I mentioned a couple days ago, [Book Review - Preview] "Building Interactive Queries with LINQPad",  the team at Packt have given me the opportunity to review Building Interactive Queries with LINQPad by S├ębastien Finot.

Building Interactive Queries with LINQPad

image6

What you will learn from this book

  • Discover what LINQ can do and how it will help you
  • Learn all about LINQ query operators to join, aggregate, select, and filter data
  • Write LINQ queries with both method and query syntaxes
  • Query databases and remote services using LINQ
  • Create and manipulate XML and in-memory collections
  • Differentiate LINQPad’s query types
  • Handle user input with LINQPad
  • Customize LINQPad to fit your taste or workflow

...

In my usual review style, I'm going to give you my impressions, feelings and thoughts about the book. I'm not going to give you chapter-by-chapter blow-by. That you can get from other reviews and by visiting the book's site...

So let's get started then!

I received the eBook on Thursday and two train rides later I was done. The book has 126 pages, but the first part (ToC, author and reviewer notes, etc) and the index at the end take a percentage of those. That just means the rest is more like condensed soup that just needs your brain juices to reconstitute (hum... not sure where I'm going with that... but it sounded kind of cool...lol). Anyway, I pretty much couldn't put it down.

This book isn't for LINQPad Ninja's. It's not really for LINQ Ninja's either.

It's perfect for those that might not be using LINQ as well as they think they should be. It's perfect for those who think they might not be using LINQPad as effectively as they could. If you're anything like me, doc's and help are a last resort. We install the app and just start clicking. If we can get it doing something, well, we're good. This means through that many times we miss features or don't use the app as well as we could be. This book will help you if you use LINQPad like that...

But more importantly, this book is a great tutorial on LINQ. It's like learning LINQ with LINQPad added as extra flavoring. That said, if you're 100% new to LINQ, I'd get a broader book. But if you're using LINQ a little, or know one or two tricks, this book is a great way to expand your existing LINQ knowledge.

I'm gushing aren't I?

Well when I read a book on one day and use what I've read the next to help me solve a problem and save a number of lines of code... well, that causes me to gush a little.

Oh it's not perfect. There's a couple tip sections repeated. The focus on Linq to SQL, while the linq stuff is great and seeing it work in the utility is really cool, it might give the impression that Linq to SQL is something you should use in your app's. Personally, I wouldn't. It's not that the tech is bad, it's just the tech is dead. Linq to SQL has about zero future.

I'd liked to have seen the "other data sources" expanded on.

But in those two chapters, there's Linq learning going on, and I wouldn't skip them, even if you don't use that tech.

Summary

If you're a LINQ Jedi or your already live in LINQPad, this book might not be for you. Think of this book as a 200 Linq & LINQPad class. So if you're already a 300, 400, 500, then, well you get the picture)

If you're looking for a book to help you improve your existing Linq knowledge, to expand beyond a limited/working use, check out this book.

If you're looking to better use the awesome that is LINQPad, check out this book.

Would I recommend this book to a friend or co-worker, knowing they'd have to pay for it? I think I've been doing just that above... :)

 

Disclosure of Material Connection: I received one or more of the products or services mentioned above for free in the hope that I would mention it on my blog. Regardless, I only recommend products or services I use personally and believe my readers will enjoy. I am disclosing this in accordance with the Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.

 

Related Past Post XRef:
[Book Review - Preview] "Building Interactive Queries with LINQPad"

Nothing like a little LinqPad fun for a Friday - "Hosting ASP.NET Web API in LinqPad"
Today's LINQPad fun, SelectExcept! (a tip on selecting all the fields, except...)
LINQPad is just for [no, not "breakfast"... ha.. fooled you] LINQ... Using LINQPad to execute code snippets.
.DumpJson() - LINQPad Extension Fun...
Playing with the TFS API via LINQPad (as in using LINQPad to query TFS via the TFS API)
LINQPad +50 - Adding 50 LINQ examples from DevCurry to LINQPad's sample pallet
Since we're talking about LINQPad... StreamInsight v1.2 Driver and samples for LINQPad
Jesse liberates our LINQ'ness - Learning LINQ, from LINQPad to Visual Studio
LINQ[Pad] to Twitter
LINQPad’ing into Dallas - The latest LINQPad now has “Dallas” support baked in.
OData my LINQPad – LINQPad (beta) now supports Data Services/OData (and there’s .Net 4 rev too)
Need an ad-hoc query tool for your Azure data tables? LINQPad to the rescue
This post title made me laugh, “I've Left Query Analyzer Hell For LINQPad Heaven”
LINQPad and the Entity Framework
Getting External with LINQPad – Advanced LINQPad Dimecast (aka part 3 of 3)
Fun with .Dump() in LINQPad – An intermediate level Dimecast for LINQPad
Link to LINQPad – A Dimecast LINQPad Walkthrough
LINQPad - A Free Interactive LINQ to SQL (and others) Utility (Think "SQL Query Analyzer for LINQ")

Thursday, August 01, 2013

[Book Review - Preview] "Building Interactive Queries with LINQPad"

You all know me, a month without LINQPad is a month not well lived...  :P

Anyway... When the team at Packt gave me the opportunity to review Building Interactive Queries with LINQPad by S├ębastien Finot I jumped at it.

Received the book this morning and am already 50%... (Got to love the train commute :)  I'll have the final review up this weekend, but the short of it is, this isn't a book just about LINQPad, but instead LINQ + LINQPad. If you're already 100% LINQ Ninja and use every feature of LINQPad already, then this book isn't for you. But if your LINQ skills are not what you think they should be or you'd like to take advantage or more of the features found in LINQPad, well...

Building Interactive Queries with LINQPad

image

What you will learn from this book

  • Discover what LINQ can do and how it will help you
  • Learn all about LINQ query operators to join, aggregate, select, and filter data
  • Write LINQ queries with both method and query syntaxes
  • Query databases and remote services using LINQ
  • Create and manipulate XML and in-memory collections
  • Differentiate LINQPad’s query types
  • Handle user input with LINQPad
  • Customize LINQPad to fit your taste or workflow

In Detail

If you need to interact with databases, XML, in-memory collections, or remote services, LINQ can make your life simpler. The best way to discover LINQ is with the help of LINQPad, a free IDE whose first goal is to make sure that writing and interacting with your LINQ query is fun and easy. More generally, LINQPad is a C#/VB/F# scratchpad that instantly executes any expression, statement block, or program with rich output formatting and a wealth of features.

With Building Interactive Queries with LINQPad, you will quickly learn everything you need to know to start using LINQ. To accelerate your learning curve, you will discover how to use LINQPad and its features to test your queries interactively and experiment with all the options offered by LINQ.

In all probability, you already know C#, but have you had a chance to try out LINQ? Building Interactive Queries with LINQPad will introduce you to everything LINQ can offer and will let you interact with every example in LINQPad, LINQ’s best companion.

You will learn how to build and experiment with interactive queries with this practical guide illustrated with short and detailed code samples. You will also get acquainted with other cool applications of LINQpad such as testing, code snippet generation, and so on, along with a broad approach to LINQ (to object, to SQL, to XML, and so on).

Disclosure of Material Connection: I received one or more of the products or services mentioned above for free in the hope that I would mention it on my blog. Regardless, I only recommend products or services I use personally and believe my readers will enjoy. I am disclosing this in accordance with the Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.

 

Related Past Post XRef:
Nothing like a little LinqPad fun for a Friday - "Hosting ASP.NET Web API in LinqPad"
Today's LINQPad fun, SelectExcept! (a tip on selecting all the fields, except...)
LINQPad is just for [no, not "breakfast"... ha.. fooled you] LINQ... Using LINQPad to execute code snippets.
.DumpJson() - LINQPad Extension Fun...
Playing with the TFS API via LINQPad (as in using LINQPad to query TFS via the TFS API)
LINQPad +50 - Adding 50 LINQ examples from DevCurry to LINQPad's sample pallet
Since we're talking about LINQPad... StreamInsight v1.2 Driver and samples for LINQPad
Jesse liberates our LINQ'ness - Learning LINQ, from LINQPad to Visual Studio
LINQ[Pad] to Twitter
LINQPad’ing into Dallas - The latest LINQPad now has “Dallas” support baked in.
OData my LINQPad – LINQPad (beta) now supports Data Services/OData (and there’s .Net 4 rev too)
Need an ad-hoc query tool for your Azure data tables? LINQPad to the rescue
This post title made me laugh, “I've Left Query Analyzer Hell For LINQPad Heaven”
LINQPad and the Entity Framework
Getting External with LINQPad – Advanced LINQPad Dimecast (aka part 3 of 3)
Fun with .Dump() in LINQPad – An intermediate level Dimecast for LINQPad
Link to LINQPad – A Dimecast LINQPad Walkthrough
LINQPad - A Free Interactive LINQ to SQL (and others) Utility (Think "SQL Query Analyzer for LINQ")

Tuesday, July 09, 2013

Find the "Missing LINQ" - Future project of "hard to find Linq providers." Currently home of Linq2Management (WMI)

CodePlex - Missing LINQ

MissingLinq

MissingLinq is a .NET library containing hard to find Linq providers. Current Linq providers include:
  • Linq2Management: Linq provider for WMI.

Linq2Management

Linq2Mangement is a C# library that allows access to WMI object instances using Linq expressions. Queries are performed in the style of the Entity Framework using a context:

image

First I just liked the project name, but the Linq2Management (aka Linq2WMI) was what kept me there...

 

Related Past Post XRef:
LINQ To WMI – A marriage made in Heaven?

Tuesday, July 02, 2013

"25 Secrets for Faster ASP.NET" Free [ Name and Email Ware] eBook from Red Gate

Michaela Murray - 25 Secrets for Faster ASP.NET: the Eagle has landed!

On Friday we launched our new free eBook, 25 Secrets for Faster ASP.NET Applications!

Heading for 1000 of you have picked it up already, but if you haven’t got your copy yet, you can grab it from http://www.red-gate.com/25secrets.

It’s the follow up to the wildly successful 50 Ways to Avoid, Find and Fix ASP.NET Performance Issues, which we released back in January this year (you can download from www.red-gate.com/50ways).

Once again, we collected tips from some of the smartest brains in the ASP.NET community, but this time around, we’ve covered the latest stuff in the .NET framework – async/await, Web API, and more.

...

Red Gate - Free eBook: 25 Secrets for Faster ASP.NET Applications

  • 25 tips from the ASP.NET community for boosting performance in your web applications.
  • Learn the secrets of your fellow developers and read advice from MVPs and other experts.
  • Covers async/await, Web API, ORMs, interactions between your code and your database, and more...

Here's some snaps from the PDF; (BTW, I love that cover, very "Modern" ;)

imageimage

imageimage

image

Nice tips and the price is just right...

Friday, April 05, 2013

Nothing like a little LinqPad fun for a Friday - "Hosting ASP.NET Web API in LinqPad"

StrathWeb - Hosting ASP.NET Web API in LinqPad

Today I stumbled upon an interesting Stackoverflow question, where the user was asking how to go about self-hosting Web API in LinqPad.

The question has gone unanswered since December, and I’m guessing even the OP forgot about it. However, I’d like to elaborate a bit about the topic. You certainly can host Web API in LinqPad, provided you plug in a quick work around – and we actually did hit a similar issue with scriptcs.

Understanding LinqPad

LinqPad is an absolutely terrific tool, which allows you to write complex C# without Visual Studio. To be able to answer our original Web API hosting question, we need to understand what LinqPad does under the hood. Unfortunately, we won’t be able to dig much beyond the rough overview LinqPad offers on its about page, since it’s closed source.

However the page also features a nice chart explaining the high levels of LinqPad. I hope Joseph will take no offense if I hotlink it here:

...

Web API hosted in LinqPad.

image

Nothing like a little LinqPad Love. This is an officially cool LinqPad hack.

What can't you have LinqPad do? I wonder if I can get LinqPad to make me breakfast... :P

Thursday, February 28, 2013

Today's LINQPad fun, SelectExcept! (a tip on selecting all the fields, except...)

Managing My Technical Mess - Use SelectExcept When You Are Too Lazy To Type

"Do you love LINQPad?  Use it every day?  Do ad-hoc queries non-stop against your DataContexts?  Love C#/LINQ’s ability for anonymous object projections into new forms?  I’m assuming you said yes to all those.  Here is the question that drives this post…do you hate having to type *every* field *except* one (or a few) when you *only* need almost all fields?  If you answered yes to that last question or are wondering why I don’t just allow the entire row to be selected/returned, continue reading…

...

image

..."

A cool, with source, example of leveraging LINQPad and making it conform to your WILL!!! MUAHAHAHA... Oh... sorry... Been that kind of week... :)

Monday, February 25, 2013

LINQToWiki (yes, even Wikipedia)

Wikipedia - User:Svick/LinqToWiki

LinqToWiki is a library for accessing MediaWiki wikis (including Wikipedia) through the API from .Net languages like C# and VB.NET.

It can be used to do almost anything that can be done from the web interface and more, including things like editing articles, listing articles in categories, listing all kinds of links on a page and much more. Querying the various lists available can be done using LINQ queries, which then get translated into efficient API requests.

The library is strongly-typed, which means it should be hard to make invalid requests and it also makes it easy to discover available methods and properties though IntelliSense

SNAGHTMLa9c940cSNAGHTMLa9d3b52

LinqToWiki

LinqToWiki is a library for accessing sites running MediaWiki (including Wikipedia) through the MediaWiki API from .Net languages like C# and VB.NET.

It can be used to do almost anything that can be done from the web interface and more, including things like editing articles, listing articles in categories, listing all kinds of links on a page and much more. Querying the various lists available can be done using LINQ queries, which then get translated into efficient API requests.

The library is strongly-typed, which means it should be hard to make invalid requests and it also makes it easy to discover available methods and properties though IntelliSense.

Because the API can vary from wiki to wiki, it's necessary to configure the library thorough an automatically generated assembly.

...

SNAGHTMLa9b6f4d

The best part is the source for the library is available too. That's officailly cool... :)

SNAGHTMLa9ee4ba

 

(via reddit - LinqToWiki: A strongly typed library for accessing the Wikipedia API)

Tuesday, September 18, 2012

$linq, a .NET Linq to Objects for JavaScript script (i.e. LINQ for JavaScript)

Ginktage - $linq – A Javascript LINQ library v1.0 Released

A few days back, $linq v1.0 was released which is now available for download from codeplex website.

$linq is a Javascript version of .NET’s LINQ to Objects and implements most of the corresponding .NET LINQ to Objects methods like select , select many, where, order by, distinct, group by, join, except etc.

$linq also implements some of the methods that are inspired by MoreLinq and can work with arrays and JQuery collections

image

$linq - A Javascript LINQ library

Project Description
$linq is a Javascript version of .NET's Linq to Objects, with some query operations inspired by MoreLinq (an extension to Linq to Objects).

What is $linq?

$linq is an implementation of .NET Linq to Objects for Javascript. It implements most of the corresponding .NET Linq to Objects methods. It also implements some methods inspired by MoreLinq (http://code.google.com/p/morelinq). $linq will work with arrays and jQuery collections. $linq can also generate values from a numerical range, as an item repeated a given number of times, and from RegExp match results.

Some of the Linq to Objects methods implemented

  • select
  • selectMany
  • where
  • orderBy
  • thenBy
  • distinct
  • groupBy
  • groupJoin
  • join
  • except
  • union
  • intersect
  • take/takeUntil
  • skip/skipUntil

SNAGHTMLce10f3d

More LINQ is good LINQ! And I have to see it's cool-weird to see it in Javascript...

Monday, September 17, 2012

LINQPad is just for [no, not "breakfast"... ha.. fooled you] LINQ... Using LINQPad to execute code snippets.

Filip Ekberg's Blog - Use LINQPad for more than LINQ

I like to spend time on StackOverflow and contribute by answering as many questions as I have time to. Many of the questions consist of code that doesn’t always work as expected. In these times I find that LINQPad is the perfect tool to use when you want to run the sample code or create smaller samples yourself for your answers.

Don’t be confused by the name!

Just because the name is LINQPad, it doesn’t mean it only does LINQ. Even if evaluating and running expressions is what it does best. LINQPad will allow you to run the following code types:

  • C# Expression
  • C# Statement(s)
  • C# Program
  • VB Expression
  • VB Statement(s)
  • VB Program
  • SQL
  • ESQL
  • F# Expression
  • F# Program

This makes LINQPad really powerful!

Best of all, there’s a free alternative with a little less sugar on it. I recommend buying a license to support this amazing developer tool though and it will give you autocompletion in LINQPad, which makes it even more powerful!

Running C# code

Let us take a look at LINQPad and what it looks like. Here’s what LINQPad looks like when you first start it up, it’s clean and intuitive:

....

image..."

Any day with a LINQPad tip is a good day... :)

(via Jason Haley - Interesting Finds: September 17, 2012)

 

Related Past Post XRef:
.DumpJson() - LINQPad Extension Fun...
Playing with the TFS API via LINQPad (as in using LINQPad to query TFS via the TFS API)
LINQPad +50 - Adding 50 LINQ examples from DevCurry to LINQPad's sample pallet
Since we're talking about LINQPad... StreamInsight v1.2 Driver and samples for LINQPad
Jesse liberates our LINQ'ness - Learning LINQ, from LINQPad to Visual Studio
LINQ[Pad] to Twitter
LINQPad’ing into Dallas - The latest LINQPad now has “Dallas” support baked in.
OData my LINQPad – LINQPad (beta) now supports Data Services/OData (and there’s .Net 4 rev too)
Need an ad-hoc query tool for your Azure data tables? LINQPad to the rescue
This post title made me laugh, “I've Left Query Analyzer Hell For LINQPad Heaven”
LINQPad and the Entity Framework
Getting External with LINQPad – Advanced LINQPad Dimecast (aka part 3 of 3)
Fun with .Dump() in LINQPad – An intermediate level Dimecast for LINQPad
Link to LINQPad – A Dimecast LINQPad Walkthrough
LINQPad - A Free Interactive LINQ to SQL (and others) Utility (Think "SQL Query Analyzer for LINQ")

Sunday, August 12, 2012

Check out XFiles... ["Using XPath to Navigate the File System"]

CodeProject - Using XPath to Navigate the File System

Introduction

This article has two goals:

  1. It shows how to make your own XPathNavigator implementation and use it to evaluate XPath expressions and apply XSLT transformation to the structures, not intended to be used this way
  2. It presents the new alternative way to work with files and folders that some people may consider useful

What is XPathNavigator

XPathNavigator is the system abstract class, that implements XPath document model and provides means of navigating through XML nodes, and evaluating XPath expressions. Unlike XmlNode or XNode, XPathNavigator is a cursor, that may point to any node in the XML tree and be moved to another node. XPathNavigator is also used as an input for XslCompiledTransform, and therefore any implementation of the XPathNavigator can be transformed with an XSLT stylesheet.

XPathNavigator implementations exist for all XML models in .NET, including XmlDocument and LINQ to XML. Generally an instance of an XPathNavigator inheritor can be created for classes that implement IXPathNavigable interface. This interface contains a single method - CreateNavigator. Classes XmlNode and XPathDocument (a special fast model that only provides read-only access via XPathNavigator model) implement IXPathNavigable. However this is not always the case. The newest library for working with XML - LINQ to XML - allows creation of XPathNavigator with extension methods.

It's worth mentioning that none of the system-integrated implementations of the XPathNavigator are public.

How to implement XPathNavigator

XPathNavigator contains 116 public members, 112 of which can be overridden. Good news that only 20 of them are abstract, i.e. must be implemented.

Here they are:

...

SNAGHTML99d2f8a[4]

image..."

When I first saw this I wasn't sure if it was insane or inspired. I'm still not sure about that, but I am sure that I think this is pretty awesome.

Friday, May 25, 2012

LINQ Koans - Learn LINQ by doing LINQ

CodePlex - LINQ_Koans

Koans allow you to 'try out' aspects of a language while working in the language. In these koans, you just download the project, unzip it and open it in VS2010. Work with source the files in the following order:

1) LinqSynax.cs

2) LinqLambdaSyntax.cs

3) ExtendedLinqLamdbaSyntax.cs

As you change the blank (variable) to the correct answer and get the tests to pass, be sure to ask yourself after you get a green bar for each method, 'What did I just learn?'

This is a pretty cool means to learn LINQ by doing. Based on Unit Tests, you scroll down the class, "fixing" each test by replacing the "____" with the correct value.

image

image

Saturday, May 12, 2012

Array Visualizer - VS 2010 Debugging array visualizer and WinForm/WPF control you can use too...

Visual Studio Gallery - Array Visualizer

"Array Visualizer is a free, open source extension for visual studio. It is designed to display 2D, 3D and 4D arrays while debugging an application.

image

..."

CodePlex  - Array Visualizer

"Array Visualizer Controls & VS Extension

Array Visualizer is a set of WPF and WinForms controls that enable visualization of 2D, 3D and 4D arrays.

The Visual Studio Extension is provided for easy integration with the VS 2010 IDE and enables visualization of arrays at debug time. The extension can downloaded directly from Visual Studio Gallery or from within VS 2010.

Additional WPF and WinForms projects are provided to illustrate the use of the Array Visualizer controls leveraging the LINQ style array extension from the Linq Extensions Library.

..."

There's a number of cool things here, the visualizer itself, that the source for it is also available and coolest, that it's actually a control you can use yourself in your app's...

.DumpJson() - LINQPad Extension Fun...

Elton Stoneman - Extension method for outputting formatted JSON in LINQPad

"Very simple, but a handy way of viewing nicely-formatted JSON in LINQPad:

image..."

I love me some LINQPad!

 

Related Past Post XRef:
Playing with the TFS API via LINQPad (as in using LINQPad to query TFS via the TFS API)
LINQPad +50 - Adding 50 LINQ examples from DevCurry to LINQPad's sample pallet
Since we're talking about LINQPad... StreamInsight v1.2 Driver and samples for LINQPad
Jesse liberates our LINQ'ness - Learning LINQ, from LINQPad to Visual Studio
LINQ[Pad] to Twitter
LINQPad’ing into Dallas - The latest LINQPad now has “Dallas” support baked in.
OData my LINQPad – LINQPad (beta) now supports Data Services/OData (and there’s .Net 4 rev too)
Need an ad-hoc query tool for your Azure data tables? LINQPad to the rescue
This post title made me laugh, “I've Left Query Analyzer Hell For LINQPad Heaven”
LINQPad and the Entity Framework
Getting External with LINQPad – Advanced LINQPad Dimecast (aka part 3 of 3)
Fun with .Dump() in LINQPad – An intermediate level Dimecast for LINQPad
Link to LINQPad – A Dimecast LINQPad Walkthrough
LINQPad - A Free Interactive LINQ to SQL (and others) Utility (Think "SQL Query Analyzer for LINQ")

Wednesday, April 25, 2012

Building a dynamic search with LINQ (think WHERE chaining)

Paul Sheriff's Blog for the Real World - Dynamic Search with LINQ, the Entity Framework and Silverlight – Part 2

"After my previous blog post, I realized that using SQL strings is not a great way to do things. Sometimes we start blogging too quick and then realize our mistakes after. But, no big deal, live and learn... I am going to now rewrite this application and use some lambda expressions to solve the problems inherit with concatenating strings to SQL statements; namely escaping a single quote and SQL Injection attacks. I am going to use the same search screen shown in Figure 1.

image..."

I thought this an interesting example of building a dynamic, user driven, multiple field query (or "where" wizard). Not sure I like the case usage (that looks like it could easily spiral out of maintenance control), but it does make it easy to read and grok (and this is just a demo)...

Wednesday, December 07, 2011

LINQ to Reports... As in transform your LINQ queries into reports, with extensible formats like Excel, PDF, CSV, HTML

Matt Hidinger - Transform your LINQ queries into Excel/PDF reports with DoddleReport 1.2

DoddleReport builds tabular reports from any IEnumerable datasource. Out of the box it can render reports to Excel, PDF, HTML, and CSV – fully pluggable of course. I created the project to provide reporting output over the LINQ queries we had already written for an application, but maybe you can find other uses for it.

So what does it generate?

The following samples are generated live in real-time (notice the data will change every time you open the report)

SNAGHTML3ec93211

image..."

CodePlex - DoodleReport

image

DoddleReport automatically generates tabular reports from any IEnumerable datasource.

Out of the box it can render reports to Excel, PDF, HTML, and CSV – fully pluggable of course. I designed the project to provide reporting output over the LINQ queries we had already written for the application, but maybe you can find other uses for it.

Blog Updates

For updates and other topics please visit my blog at http://www.matthidinger.com or follow me @matthidinger

Get Started!
New to DoddleReport?
NuGet Packages

DoddleReport has been split into multiple packages to support more users’ needs. See their Descriptions within NuGet for more on the differences

  • Install-Package DoddleReport
  • Install-Package DoddleReport.Web
  • Install-Package DoddleReport.iTextSharp
  • Install-Package DoddleReport.AbcPdf
  • Install-Package DoddleReport.OpenXml
  • Install-Package DoddleReport.Dynamic
New in v1.2
  • NEW WRITER: A new OpenXML ExcelReportWriter found in the DoddleReport.OpenXml package, courtesy of Louis-Philippe Perras
  • NEW WRITER: A new iTextSharp PDF writer can be found in the DoddleReport.iTextSharp package, courtesy of Louis-Philippe Perras (thanks again!)
  • Breaking change: The root namespace changed from Doddle.Reporting to just DoddleReport
  • Breaking change: The Default Orientation for reports is now Portrait
  • All Web references moved to separate project to allow for .NET Client Profile support for WinForms/WPF
  • Added “myReport.RenderHints.BooleansAsYesNo = true” to write Yes/No on the reports for boolean fields
  • Added custom FileName support for web reporting as requested in Discussions
  • Added MVC Areas support by calling areaRegistrationContext.MapReportingRoute();
  • Various Bug fixes and enhancements as reported in the Discussion forum and Issue Tracker

SNAGHTML3ecc1bb4

Okay, that's kind of awesome...

Tuesday, September 13, 2011

Playing with the TFS API via LINQPad (as in using LINQPad to query TFS via the TFS API)

Tarun Arora - TFS API: Using LINQpad to query TFS

"Download Demo - LINQpad Query

In this blog post I’ll be showing you how to query TFS using LINQpad.

1. Download LINQpad

Those who are familiar with LINQpad know its benefits and ease of use, i would urge others to try it. You can download LINQpad and read more about it from here => http://www.linqpad.net/

2. Download TFS SDK

I have a blog post on where and how to download the TFS SDK from => here

3. Querying TFS using LINQpad

  • Open LINQpad

...

image..."

Funny the things you never think of using. Like I never even thought of using LINQPad to play with the TFS API...

(via Alvin Ashcraft's Morning Dew - Dew Drop – September 13, 2011)

 

Related Past Post XRef:
LINQPad +50 - Adding 50 LINQ examples from DevCurry to LINQPad's sample pallet
Since we're talking about LINQPad... StreamInsight v1.2 Driver and samples for LINQPad
Jesse liberates our LINQ'ness - Learning LINQ, from LINQPad to Visual Studio
LINQ[Pad] to Twitter
LINQPad’ing into Dallas - The latest LINQPad now has “Dallas” support baked in.
OData my LINQPad – LINQPad (beta) now supports Data Services/OData (and there’s .Net 4 rev too)
Need an ad-hoc query tool for your Azure data tables? LINQPad to the rescue
This post title made me laugh, “I've Left Query Analyzer Hell For LINQPad Heaven”
LINQPad and the Entity Framework
Getting External with LINQPad – Advanced LINQPad Dimecast (aka part 3 of 3)
Fun with .Dump() in LINQPad – An intermediate level Dimecast for LINQPad
Link to LINQPad – A Dimecast LINQPad Walkthrough
LINQPad - A Free Interactive LINQ to SQL (and others) Utility (Think "SQL Query Analyzer for LINQ")

Sunday, August 14, 2011

LINQPad +50 - Adding 50 LINQ examples from DevCurry to LINQPad's sample pallet

Devcurry - 50 LINQ Examples Now in LINQPad

"I had recently written an article on 50 LINQ Examples, Tips and How To's.

Software Developer and geek John Flynn took these examples and did a great job compiling these queries into a format which can be executed using LINQPad.

...

SNAGHTML60f3699..."

Devcurry - 50 LINQ Examples, Tips and How To's

"I have been writing some LINQ tutorials on www.devcurry.com and most of these posts contain short snippets that can be used in your projects or demonstrate how to use LINQ effectively. I wanted to share them with my readers over here. These short examples demonstrate how to use a particular LINQ feature and are listed over here in no particular order.

...

image..."

Adding goodness to LINQPad is only a good thing...

 

Related Past Post XRef:
Since we're talking about LINQPad... StreamInsight v1.2 Driver and samples for LINQPad
Jesse liberates our LINQ'ness - Learning LINQ, from LINQPad to Visual Studio
LINQ[Pad] to Twitter
LINQPad’ing into Dallas - The latest LINQPad now has “Dallas” support baked in.
OData my LINQPad – LINQPad (beta) now supports Data Services/OData (and there’s .Net 4 rev too)
Need an ad-hoc query tool for your Azure data tables? LINQPad to the rescue
This post title made me laugh, “I've Left Query Analyzer Hell For LINQPad Heaven”
LINQPad and the Entity Framework
Getting External with LINQPad – Advanced LINQPad Dimecast (aka part 3 of 3)
Fun with .Dump() in LINQPad – An intermediate level Dimecast for LINQPad
Link to LINQPad – A Dimecast LINQPad Walkthrough
LINQPad - A Free Interactive LINQ to SQL (and others) Utility (Think "SQL Query Analyzer for LINQ")

Tuesday, July 19, 2011

Since we're talking about LINQPad... StreamInsight v1.2 Driver and samples for LINQPad

Microsoft StreamInsight - Updated LINQPad Driver and Samples

"With the release of StreamInsight V1.2 we also updated our LINQPad driver. It is now aware of StreamInsight versions, so that a sample can fail gracefully if the required library version is not found.

You can install the new driver (of update your existing one) as follows: In LINQPad click on Add connection:

...

If you had downloaded samples for an earlier version, confirm that you want to overwrite them. The samples are now available in the StreamInsight subfolder:

untitled

We will discuss the features that are demonstrated by the new samples (What’s New in 1.2) in an upcoming series of blog postings."

I've not blogged about StreamInsight much (cough... at all), but that doesn't mean I'm not watching out for it. CEP (Complex Event Processing) looks like an interesting area and as we get inundated with more and more date, processing it at speed and turning it into information, could grow into an important business aspect (think monitoring all the event logs for all your systems... or social media "hoses"... dealing with "big data"... etc. etc...)

 

Related Past Post XRef:
Free, as in free, eBook - Introducing Microsoft SQL Server 2008 R2 (direct download, no reg required)

Jesse liberates our LINQ'ness - Learning LINQ, from LINQPad to Visual Studio
LINQ[Pad] to Twitter
LINQPad’ing into Dallas - The latest LINQPad now has “Dallas” support baked in.
OData my LINQPad – LINQPad (beta) now supports Data Services/OData (and there’s .Net 4 rev too)
Need an ad-hoc query tool for your Azure data tables? LINQPad to the rescue
This post title made me laugh, “I've Left Query Analyzer Hell For LINQPad Heaven”
LINQPad and the Entity Framework
Getting External with LINQPad – Advanced LINQPad Dimecast (aka part 3 of 3)
Fun with .Dump() in LINQPad – An intermediate level Dimecast for LINQPad
Link to LINQPad – A Dimecast LINQPad Walkthrough
LINQPad - A Free Interactive LINQ to SQL (and others) Utility (Think "SQL Query Analyzer for LINQ")