In this quick post, I will show you how you could avoid pluralization of classes in LINQ to SQL Step1 Open visual studio and click on Tool from Menu. Then select Options Step 2 Select Database Tools tab Step 3 Now choose O/R designer option from Database tool tab Step 4 Change Enabled to False.ContinueContinue reading “Turning off Pluralization of classes in LINQ to SQL O/R designer”
Author Archives: Dhananjay Kumar
Resolving Concurrency conflicts in LINQ
While performing database operation, one major thing need to be taken care of is Concurrency Conflicts. Concurrency conflict can happen when two sources are try to modify database at the same time. Let us understand conflict in LINQ with an example, From above diagram you can infer that, essentially there are three steps involved inContinueContinue reading “Resolving Concurrency conflicts in LINQ”
Logging in LINQ to SQL
It is very common that may come in your mind that, how we can see SQL query being generated at the back end for LINQ query. Assume you have a LINQ as below, If you want to view SQL query generated for above LINQ on console screen you need to add just one line ofContinueContinue reading “Logging in LINQ to SQL”
Inserting/Updating Record on related entities using LINQ
It is a very common scenario that you need to insert rows in related tables using LINQ. Assume you have two tables as below, Insert a Person with no Office Assignment If you have requirement to insert a Person without any Office Assignment then it is quiet straight forward task like below If you needContinueContinue reading “Inserting/Updating Record on related entities using LINQ”
New Ways of Accessing Data : Presenting in Kolkata Community Tech Days
Hi Friends I will be delivering a session in Kolkata Community Tech Days on 2nd July. Read Kolkata session details here Register here Session details are as follows, Address: Rotary Sadan 94/2 Chowringhee Road Kolkata – 700020 Date: 2nd July 2011 Title: New ways of accessing your Data Abstract: This demo oriented session will exploreContinueContinue reading “New Ways of Accessing Data : Presenting in Kolkata Community Tech Days”
DataContext in LINQ
To make a communication with Database a connection must be made. In LINQ this connection is created by DataContext. Essentially Data Context class performs below two tasks Create connection to database. It submits and retrieves object to database. Converts objects to SQL queries and vice versa You can say, it acts as exactly the sameContinueContinue reading “DataContext in LINQ”
Connection string in LINQ
It is very common that you come across scenario when at run time you need to change the database server and so the connection string is used in your LINQ. This may come as requirement, if you are moving your application from dev server to staging and from staging to production. There are two waysContinueContinue reading “Connection string in LINQ”
Learn ADO.Net Entity Framework: Performing basic CRUD Operation
In this post I will walkthrough you on performing basic CRUD operation using ADO.Net Entity framework. Database design I am going to use School Database. You can find School database script here . To be precise, I am going perform CRUD operation on only one table Person. Schema of Person table is as below. IContinueContinue reading “Learn ADO.Net Entity Framework: Performing basic CRUD Operation”
Tracing in WCF: Understanding basic steps
Theory behind WCF Tracing is not an exception of classical definition of Tracing. Through Tracing an application provides information about itself. Information may vary from internal state of object to passed input parameter to method. This information should be logged, persisted or saved somewhere. WCF Tracing can be used for the instrumentation of the WCFContinueContinue reading “Tracing in WCF: Understanding basic steps”
Viewing Flickr Images on Windows 7.1 Phone or Mango Phone
In this post I will show you how you can create a Photo Viewer from images of the Flickr Service. Flickr Service Flickr expose a REST based feed to access images. You can find information about Flickr public feed at below link. http://www.flickr.com/services/feeds/docs/photos_public/ Public images feed can be find at http://api.flickr.com/services/feeds/photos_public.gne Expected Output Approach CallContinueContinue reading “Viewing Flickr Images on Windows 7.1 Phone or Mango Phone”