Tuesday, March 25, 2014

DataContract vs Serializable WCF

When applied to a class Serializable attribute serializes everything inside of it including private fields thus the developer has no control as what to expose. When DataContract attribute is applied to a class it will serialize only the elements decorated with DataMember attribute thus the developer...

ServiceContract Name property WCF

This property can give your contract a name which is different from the actual interface name. So this way if you decide to change the interface name of a already running WCF service your client wont break. Ex:  [ServiceContract(Name="IGoodbyeService")]     public interface IHelloService  ...

Monday, March 24, 2014

Basic Elements of WCF Appconfig

All config items should be inside , <system.serviceModel> This is the WCF namespace provided by Microsoft. Inside the <system.serviceModel> element you have the <services> element. This is where you configure all your services. For each service you have a <service>...

Saturday, March 22, 2014

system.web vs system.webserver

I have not worked in IIS6 and mostly I have worked on IIS 7+ and this came up when I was following a very old article (2003) ASP.Net article. Anyway system.web is IIS6 and classic mode. system.webserver is IIS7+  and integrated mode. One scenario you might come across is when adding httpmodules...

Sunday, March 9, 2014

Saturday, March 8, 2014

SQL COUNT Example

COUNT returns the number of rows in a select statement (Also note that it doesn't consider null values), Note : I'll be using the AdventureWorks2008R2 sample database which can be downloaded from here, http://msftdbprodsamples.codeplex.com/releases/view/59211 Example 1, /* By using the * we return...

Saturday, March 1, 2014

DDL vs DML in SQL Server

DDL Data Definition Language (DDL) statements are used to define the database structure or schema. Examples: CREATE - to create objects in the database ALTER - alters the structure of the database DROP - delete objects from the database DML Data Manipulation Language (DML)...