Posts

Showing posts from January 31, 2010

Applications using Linq to SQL

Image
Introduction In this article, I want to illustrate the principles, techniques and tools to develop applications using Linq to SQL after a deep research on this topic. If you look for this topic on Internet, we can see that a lot of .NET developers are blogging and discussing about this new feature of the languages in Microsoft.NET platform and its support by Visual Studio.NET 2008. Getting to know Linq Linq stands for Language Integrated Query and it's a new approach to access efficiently any type of data, making querying data a first class concept on .NET languages. It enables creating queries using less code, so the resulting queries are easier to understand. It's remarkable to say that Linq is not specific to data sources, so it does not matter where the data resides. In the actual implementation, Linq is divided into four common types: Linq to Objects, Linq to DataSet, Linq to SQL, and Linq to XML. You can also extend the Linq framework to support ot

ResourceDictionary in WPF

Image
The items in a ResourceDictionary are not immediately processed when application code is loaded by a XAML loader. Instead, the ResourceDictionary persists as an object, and the individual values are processed only when they are specifically requested. The ResourceDictionary class is not derived from DictionaryBase. Instead, the ResourceDictionary class implements IDictionary but relies on a Hashtable internally. In Extensible Application Markup Language (XAML), the ResourceDictionary class is typically an implicit collection element that is the object element value of several Resources properties, when given in property element syntax. For details on implicit collections in XAML, see XAML Syntax Terminology. An exception is when you want to specify a merged dictionary; for details, see Merged Resource Dictionaries. Another possible XAML usage is to declare a resource dictionary as a discrete XAML file, and either load it at run time with Load or include it in a (full

Drag And Drop Item in ListBox in WPF

Image
Introduction In this article we will see how we achieve Drag and Drop behaviour for ListBox Item. Creating WPF Project Fire up Visual Studio 2008 and create a new WPF Project. Name it as DragDropListBoxSample. Basic idea of our sample application is to have two ListBox and we would provide Drag item from First ListBox and Drop into the Second ListBox. So let's have two ListBox and name the ListBoxes as lbOne, lbTwo. The following is the basic design how our application would look like. Here what we would list in the First ListBox. A list of TimeZones from the class TimeZoneInfo. See full details:  http://www.c-sharpcorner.com/UploadFile/dpatra/181/Default.aspx

Returning Large Volume of Records from SOAP based WCF Service

Objective In this article I will explain; How to return large volume of data (around 50000 records) from SOAP based WCF service to any client. I will show; what service configuration setting and client configuration setting is needed to handle large volume of data returning for WCF service. Follow the below steps, Step 1: Create a WCF service .To creates WCF service; select File -> New -> Project-> Web -> WCF Application. Service will contain One Operation contract. This function will pull large data from database using stored procedure. One Data Contract. This class will act as Data Transfer object (DTO) between client and service. basicHttpBinding is being used in the service. You are free to use any binding as of your requirement. Data Transfer Class [ DataContract ]     public class DTOClass     {         [ DataMember ]         public string SystemResourceId         {             get ;             set ;         }         [ DataMem