Archives
-
Visual Studio 2011 New Editor Features
To add a asp:DetailsView, all I typed was <dv, and it’s there for you.
-
TPL Dataflow–An overview
Some time back I blogged about Parallel Tasks that was introduced in .net 4.0. This was a part of the Task Parallel Library (TPL) made available to the developer community to add parallel / concurrency concepts to their applications.
-
Good ol’ DebuggerDisplay attribute
I got to know about this DebuggerDisplay attribute that you can use on your types for ease of debugging, seems like this has been there since VS2005.
-
Solution Explorer gets new features in VS 2011
The more I play with VS 2011 (in Dev Preview, don’t hold me if things in future versions don’t have what I’ve mentioned below), the more interesting I find it. Productivity Power Tools is a VS plugin which has some interesting features (blogged here) and one of them was the Solution Navigator. A good number of the features from Solution Navigator have been incorporated in the good ol’ Solution Explorer now.
-
ReadOnlyDictionary in .net 4.5
Oh yea, .net 4.5 is out (although it’s still Developer Preview).
-
Using Autofac DynamicProxy2 Interceptors with MVC3–Part 2
Continuing from the previous post, the interceptor is now ready to be registered and consumed.
-
Using Autofac DynamicProxy2 Interceptors with MVC3–Part 1
Autofac is an IoC container and using DynamicProxy we can intercept method calls to perform custom logic. What this means is that, you can actually add ‘hooks’ to methods in your code so that when these methods are called, you automatically invoke an ‘interceptor’ method that wraps the call to your method.
-
Some cool features introduced in ReSharper 6
I recently upgraded to ReSharper 6 and the experience so far has only been positive. Here are the top things for which I said ‘Good job Jetbrains’.
-
RSS Feed moved to Odiogo
I have moved my feeds to Odiogo – Automatic podcast generation and “Near-human” quality text-to-speech are the features that prompted me to make the switch.
-
Registering KnownType types at runtime using IsAssignableFrom()
While doing some reflection, I hit this method IsAssignableFrom(). MSDN says:
-
Extension methods on a null object instance
Extension methods gave developers with a lot of bandwidth to do interesting (read ‘cool’) things. But there are a couple of things that we need to be aware of while using these extension methods.
-
IEnumerator.Current property and IEnumerator.MoveNext method
Here’s a question: What happens to the Current property of an IEnumerator before and after the MoveNext() call? When I say ‘after the MoveNext() call’, I mean after MoveNext() returns a false indicating an end of the collection.
-
Sort method versus OrderBy LINQ extension method
I have a class Product with an Id and a Name as properties. There are multiple ways of getting a list of products to display in sorted/ordered fashion, say, by the Name of the product. The two I’m concerned about here are the Sort and the OrderBy extension method through LINQ and the difference between them.
-
WCF Service Trace Viewer Part 2
Continuing from the previous part, now we’ll have a look at what happens when we call the service using WSHttpBinding. For this, I have to instantiate my LearnWcfService service passing the WSHttp binding endpoint to the constructor. The rest of the method runs the exact same instructions as before. I have also changed the instantiateData attribute in the app.config file to ClientLogWsHttp.svclog, just to keep the log files separate.
-
WCF Service Trace Viewer Part 1
I hit upon this tool SvcTraceViewer.exe and found it quite interesting. Usually located at <drive>:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools (for version .net 4.0), this tool helps you to locate an error that’s happening behind the scenes. It also gives you a better understanding of how things flow with a service.
-
FeedBurner not getting my latest blog articles from weblogs.asp.net–need help
This is more of an ‘I need help’ kind of an article. So, my feed stopped getting updated with my blogs – a few of my blogs from April and May do not show up in the feed.
-
WCF Data Services Toolkit to talk to any database using GetAll, GetOne, Save, Remove methods
I did a primer on using WCF Data Services in my last post. One of the things I’m seeing about the posts regarding WCF Data Services using OData is that they used Entity Framework to do the DAL work. So a lot of underlying work gets hidden by using EF. Here is a post that allows you to connect to any database using the traditional ADO.NET way.
-
Accessing data as resource through URI - WCF Data Services
Open Data Protocol (OData for short) allows CRUD operations on your data by exposing it as a resource accessible through a URI. So you can try something like below directly on the browser to get a collection of all employees less than 26 years of age.
http://somesite.com/EmployeeService.svc/Employees?$filter=Age lt 26 -
Attach to IISExpress process from Visual Studio
With VS2010 SP1, you can attach an application process to IISExpress to enable debugging of an application. Here’s how:
-
It’s a boy – Ayush is here
The 19th of April will remain a special day for us for the rest of our lives. Pallavi and I had our first one on this day at 1:25a. Ayush was 3.4kg (7.48lb) at birth. Both Mom and son are doing good.
-
Executing SQL queries on SQL CE 4 through Entity Framework
In my previous blog, I wrote about how to use inheritance through entity framework on SQL CE database. In this blog however, I’ll explore how you can run a typical SQL query statement on the database table and read/write the values. I will build on the application that I used in the last article.
-
Entity Framework Model Inheritance with SQL CE 4
For some (unknown) reason, I’ve been curious to work with SQL CE, just hadn’t gotten a chance to work with it. If you’re not familiar with what SQL CE is all about, go through this article from Scott Gu.
-
VS2010 crashes fixed with Productivity Power Tools upgrade
I’m guessing people have at least heard of Productivity Power Tools plug-in for Visual Studio. If not, I strongly recommend you give it a shot.
-
Drawing on a webpage – HTML5 - IE9
So I upgraded to IE9 and continued exploring HTML5. Now there’s this ‘thing’ called Canvas in HTML5 with which you can do some cool stuff.
-
HTML5-MVC application using VS2010 SP1
This is my first attempt at creating HTML5 pages. VS 2010 allows working with HTML5 now (you just need to make a small change after installing SP1). So my Razor view is now a HTML5 page.
-
Templated Razor Delegates – Phil Haack
This post is largely based off of Phil Haack’s article titled Templated Razor Delegates. I strongly recommend reading this article first. Here’s a sample code for the same, so you can have a look at. I also have a custom type being rendered as a table.
-
Passing a parameter so that it cannot be changed – C#
I read this requirement of not allowing a user to change the value of a property passed as a parameter to a method. In C++, as far as I could recall (it’s been over 10 yrs, so I had to refresh memory), you can pass ‘const’ to a function parameter and this ensures that the parameter cannot be changed inside the scope of the function.
-
ASP.NET MVC ‘Extendable-hooks’ – ControllerActionInvoker class
There’s a class ControllerActionInvoker in ASP.NET MVC. This can be used as one of an hook-points to allow customization of your application. Watching Brad Wilsons’ Advanced MP3 from MVC Conf inspired me to write about this class.
-
WSDL-world vs CLR-world – some differences
A change in mindset is required when switching between a typical CLR application and a web service application. There are some things in a CLR environment that just don’t add-up in a WSDL arena (and vice-versa). I’m listing some of them here. When I say WSDL-world, I’m mostly talking with respect to a WCF Service and / or a Web Service.
-
WCF – interchangeable data-contract types
In a WSDL based environment, unlike a CLR-world, we pass around the ‘state’ of an object and not the reference of an object. Well firstly, what does ‘state’ mean and does this also mean that we can send a struct where a class is expected (or vice-versa) as long as their ‘state’ is one and the same? Let’s see.
-
Hierarchy flattening of interfaces in WCF
Alright, so say I have my service contract interface as below:
-
Very detailed chapter on Garbage Collection
I recently read one of the most detailed chapters on GC in the book
-
Get and Set property accessors are ‘actually’ methods
Well, they are ‘special’ methods, but they indeed are methods. See the class below:
-
Top 10 posts of 2010
I quote one of my professors when I say: “We Share – We Improve”. It is through blogging that I’ve learned quite a bit. The ‘R&D’ done to learn and perfect a technology and the comments by other experts adds towards skill-set building. Below are some of the articles that I’m glad I blogged about.