Web API 2 – Cross-Origin Resource Sharing (CORS) Support

Web API 2 has the CORS support  out of the Box. Its available as attributes called EnabledCors and DisableCors. As an attribute it can be extended based on our requirement,  we can easily bring the feature to allow or disallow specific external sites to share resource. Cross-Origin attribute can be enabled globally on WebApiConfig as…

Read More →

ASP.Net MVC with Entity Framework and Repository Pattern

Repository pattern provides more object oriented way of encapsulating objects of the data store and operations can performed through neatly separated data classes. Please find below how Repository pattern implemented with entity framework and is consumed using asp.net mvc. Use either StructureMap or Ninject for dependency injection of the Entity Repository Factory object to the…

Read More →

REST Service with WCF – Testing with Fiddler

In this article I am explaining simple REST service which can accept HTTP GET Request.In response to this request service return data in XML format.You could use return type as Json format as well.This can easily set with WCF interface attribute as  ResponseFormat = WebMessageFormat.Xml.And if you associate your return type  with DataContract attribute System.Runtime.Serialization…

Read More →

Hello world with WCF

When I have started reading about WCF it looks like it involves lot XML configuration but its really cool.In this article I have started with simple example which does Hello world with WCF. 1) Create WCF Service Application Create a Console application and reference it with System.ServiceModel. Add an interface/Contract through we expose the service…

Read More →

Editing Gridview Using LINQ

       This article describes the easiest way of editing gridview by using LINQ data source and         DataContext.        Explained step by step as below, 1)      Create DataContext using Northwind Database.  Drag and drop the Product table in to Northwind.dbml datacontext, as shown below.   2)      Add Grid view to webform and choose datasource for the Gridview. Choose new…

Read More →

My Own Blog!

I have got opportunity through my friend to create a blog and it just happened in couple of hours!!! I like it very much. I would like keep this blog really technical….Let me see how far I can go…