views:

520

answers:

1

Hello all,

A small question. I am using LinqToSql in an n-tier application. I have a datacontext, and I wish to manipulate CRUD operations. I'd rather my datacontext not have object tracking for reasons of scalability. But then, when I have object tracking set to fault I cannot use the built in CRUD operations the datacontext has to offer. So... how do I work around this?

Thank you very much in advance.

+1  A: 

You can use Stored Procedures, but with object tracking off, you will not be able to use the "SubmitChanges" method to persist new objects/changes to the database. (also, just fyi, be sure to look into ADO.NET Entity Framework before committing to LINQ to SQL)

Scott Gu - LINQ to SQL Stored Procs

http://weblogs.asp.net/scottgu/archive/2007/08/16/linq-to-sql-part-6-retrieving-data-using-stored-procedures.aspx

-

LINQ to SQL overview

http://msdn.microsoft.com/en-us/library/bb425822.aspx

-

ADO.NET Entity Framework Overview

http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx

Aaron Hoffman