CSharpFeeds - All your C# feeds in one place.

Monday, December 07, 2009

Query transformations are syntactic

by Eric Lippert via Fabulous Adventures In Coding on 12/7/2009 2:20:00 PM

As you probably know, there are two ways to write a LINQ query in C#. The way I personally prefer is to use the “query comprehension” syntax: from customer in customerListwhere customer.City == "London" select customer.Name Or you can, equivalently, use the “fluent method call” syntax: customerList.Where(customer=>customer.City == "London").Select(customer=>customer.Name) These are guaranteed to be equivalent because the compiler simply transforms the former syntax into the latter syntax ...

[ read more ]

What training doesn’t teach you about reading from .Net configuration

by Jeffrey Palermo via Jeffrey Palermo (.com) on 12/7/2009 2:17:36 PM

All the material I’ve seen talking about reading from .Net configuration files concentrates on explaining the API.  The API of ConfigurationManager exposes members such as: public static class ConfigurationManager { static ConfigurationManager(); public static NameValueCollection AppSettings { get; } public static ConnectionStringSettingsCollection ConnectionStrings { get; } public static object GetSection(string sectionName); public static void RefreshSection(string ...

[ read more ]

Magellan and View Reuse

by Paul Stovell via Paul Stovell on 12/7/2009 1:44:07 PM

I just added a page on Magellan Action Filters. One of the reasons I'm excited about this is that action filters and view filters will allow me to handle a common and complicated issue - re-activating an existing view. Take a controller action like this: public ActionResult Show(int customerId) { var customer = Customers.Find(customerId); Model = new CustomerDetailsModel(customer); return Window("CustomerDetails"); } If you clicked a pair of customers in a ...

[ read more ]

Magellan Action Filters

by Paul Stovell via Paul Stovell on 12/7/2009 1:33:21 PM

Back to: Magellan Home Action Filters are typically attributes that you can apply to a Magellan controller or controller action in order to intercept the call and provide an alternative way of handling the request. They provide a poor man's Aspect Oriented Programming mechanism for controllers. Action Filters The sample below shows how an Action Filter might be used. The Log attribute can be applied to either methods or classes: public class MyController : Controller { ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us