crpietschmann

Stories kicked by crpietschmann

C# 5 PropertyChanged - No more magic strings!(www.robfe.com)

submitted by dpetersondpeterson(4397) 8 months, 6 days ago

Changes in C# 5 mean no more NotifyPropertyChanged("SomeVariable"), which is a common source of bugs. It also means we no longer have to suffer the performance degradation associated with using workarounds such as lambda's just for the sake of compile-time checking. From here on out, the compiler does the work for us. read more...

2 comments |category: |Views: 588

tags: another

3 ways to Sort in Descending order via lambdas(www.ginktage.com)

submitted by isenthilisenthil(2314) 8 months, 18 days ago

3 ways to Sort in Descending order via lambdas In C# , one can sort the List of Objects using Lambdas easily . Until now , i found the LINQ Query to be more easy to sort but after using the Lamba expression , i feel that the lambda expression can also be used effectively to sort in descending order . For example , i use the below class for the datapublic class Movie { public string MovieName { get; set; } public string Actor { get; set; } } read more...

3 comments |category: |Views: 34

tags: another

C# compiler uses Duck-Typing, not IEnumerable, for foreach loops(blogs.msdn.com)

submitted by dpetersondpeterson(4397) 8 months, 19 days ago

Turns out that according to this post, and the C# 1.0 specification, that foreach loops in C# do not use IEnumerable (as found in the documentation) but rather duck-typing. Not necessarily consequential to our every day programming lives, but interesting nonetheless. read more...

1 comment |category: |Views: 70

tags: another

Share C# Anonymous Types across Functions and Scope(blogs.msdn.com)

submitted by crpietschmanncrpietschmann(11.3k) 8 months, 29 days ago

So earlier today I was lamenting that an anonymous type can't be shared between functions with Wes Dyer, when he said "Well actually they can..." read more...

add a comment |category: |Views: 7

tags: another

15 Awesome ASP.NET Tips(www.dotnetcurry.com)

submitted by mopenmopen(3596) 9 months, 22 days ago

Some cool ASP.NET tips and tutorials you will find useful read more...

1 comment |category: |Views: 97

tags: another

Thoughts on Micro-ORMs(elegantcode.com)

submitted by dpetersondpeterson(4397) 9 months, 22 days ago

Chris Brandsma discusses some of the more popular micro-ORMs available today. In the comments, readers point out other alternatives to those listed by Chris. For those of you looking for a simple X vs Y comparison of micro-ORMs like Dapper, Simple.Data, and Massive, this may come in handy. read more...

add a comment |category: |Views: 40

tags: another

Minimalist Coding Guidelines(www.codeproject.com)

submitted by dpetersondpeterson(4397) 9 months, 22 days ago

A nice write-up on generic coding standards that can be applied to any language by any programmer. There are years of experience (42, according to the author) poured into this piece, and it shows. read more...

2 comments |category: |Views: 28

tags: another

Fun With jQuery Deferred(intridea.com)

submitted by crpietschmanncrpietschmann(11.3k) 1 year, 3 months ago

If you've upgraded to the recently released jQuery 1.5 you may have heard about the fancy new AJAX facilities that allow you to define things like this: var jax = $.ajax({ url: '/some/url' }) jax.success(function() { alert("It worked!");") }); read more...

add a comment |category: |Views: 27

tags: another

ASP.NET MVC Tip #48 – Disable Request Validation(stephenwalther.com)

submitted by crpietschmanncrpietschmann(11.3k) 1 year, 3 months ago

By default, the ASP.NET MVC framework prevents you from submitting form data that contains potentially malicious content. This feature is called request validation. This is a good feature. You don't want people sneaking scripts into your website that can steal passwords or other sensitive user information. Normally, you want to leave request validation enabled. Unlike a Web Forms application, you cannot disable request validation by using the <%@ Page ValidateRequest=”false” %> directive. You also cannot disable request validation in the web configuration (web.config) file. If you want to disable request validation then you must use the [ValidateInput] attribute. You apply the [ValidateInput] attribute to the controller action that accepts the form input. read more...

add a comment |category: |Views: 41

tags: another

ASP.NET MVC 3 RTM Released!(www.microsoft.com)

submitted by crpietschmanncrpietschmann(11.3k) 1 year, 4 months ago

ASP.NET MVC 3 is a framework for developing highly testable and maintainable Web applications by leveraging the Model-View-Controller (MVC) pattern. The framework encourages developers to maintain a clear separation of concerns among the responsibilities of the application – the UI logic using the view, user-input handling using the controller, and the domain logic using the model. ASP.NET MVC applications are easily testable using techniques such as test-driven development (TDD). The installation package includes templates and tools for Visual Studio 2010 to increase productivity when writing ASP.NET MVC applications. For example, the Add View dialog box takes advantage of customizable code generation (T4) templates to generate a view based on a model object. The default project template allows the developer to automatically hook up a unit-test project that is associated with the ASP.NET MVC application. Because the ASP.NET MVC framework is built on ASP.NET 4, developers can take advantage of existing ASP.NET features like authentication and authorization, profile settings, localization, and so on. read more...

1 comment |category: |Views: 212

tags: another

Use Non-default Membership Provider for WCF Authentication Service(msdn.microsoft.com)

submitted by crpietschmanncrpietschmann(11.3k) 1 year, 6 months ago

This topic shows how to programmatically select the membership provider when you call the ASP.NET authentication service by using Windows Communication Foundation (WCF). You can use a non-default membership provider when you have to authenticate users by using different membership providers, based on information that you get at run time. To authenticate through a non-default membership provider, you create an event handler for the Authenticating event. read more...

add a comment |category: |Views: 144

tags: another

Silverlight Cached Assemblies and you can to!(timheuer.com)

submitted by crpietschmanncrpietschmann(11.3k) 1 year, 6 months ago

One of the new features I mentioned in my What’s new/changed post on Silverlight 3 is the fact that any application developer can take advantage of the cached assembly functionality provided by Silverlight. Let me show you how and start with the current situation. read more...

add a comment |category: |Views: 5

tags: another

IronRuby and IronPython to run by the Community, IR Tools for VS ++(www.ironshay.com)

submitted by shayfriedmanshayfriedman(1411) 1 year, 7 months ago

So much going on in the DLR world - IronRuby and IronPython are officially handed over to the community, IronRuby 1.1.1 is released including IronRuby tools for Visual Studio and compatibility with Ruby 1.9.2. Good times! read more...

add a comment |category: |Views: 96

tags: another

Known Unknown of System Stored Procedure of sys.sp_tables(blog.sqlauthority.com)

submitted by pinaldavepinaldave(9662) 1 year, 7 months ago

Do you know even simple query like sys.tables can kill the performance of your system. There are better thing to use: Read more... read more...

add a comment |category: |Views: 95

tags: another

Silverlight: Embed IronRuby/DLR Scripting within XAML using IValueConv(pietschsoft.com)

submitted by crpietschmanncrpietschmann(11.3k) 1 year, 7 months ago

After I wrote the “Intro to IronRuby/DLR Scripting in C# Silverlight 4 Application” post, I came across an interesting series on embedding DLR scripts in XAML with WPF. This is an interesting series, although the code doesn’t run in Silverlight, due to the fact that Silverlight is only a subset of WPF and doesn’t support the System.Windows.Markup.MarkupExtension class. I test out a couple things in Silverlight, and I was able to get similar DLR scripting functionality working under Silverlight using a combination of a simple, custom IValueConverter and a custom UserControl class. read more...

add a comment |category: |Views: 16

tags: another

Dynamic XAP Discovery with Silverlight MEF (www.wintellect.com)

submitted by crpietschmanncrpietschmann(11.3k) 1 year, 7 months ago

What's missing, it seems, is a mechanism to dynamically discover the XAPs that are available on the server. If I'm using MEF to support a plug-in architecture, for example, I might want to drop a XAP containing a new plug-in into a folder on the server and have the plug-in automatically show up in my browser the next time the application runs. MEF won't do that on its own, but it will if you lend it a helping hand. After discussing various ways to do dynamic discovery in MEF with Jeremy Likness, I wrote a sample to demonstrate a technique based on passing InitParams to the Silverlight control. The technique is pretty simple. You begin by modifying the ASPX file that hosts your Silverlight application. First, you add an empty InitParams <params> element to the <object> element that instantiates the Silverlight control, and you include an ID and a runat="server" attribute so you can manipulate the element from server-side code: read more...

add a comment |category: |Views: 45

tags: another