LINQ To SQL and LINQ To Object
S.No | LINQ To SQL | LINQ To Object |
1 | needs a Data Context object. | doesn’t need any intermediate LINQ provider or API. |
2 | returns data of type IQueryable | returns data of type IEnumerable |
3 | translated to SQL by way of Expression Trees, which allow them to be evaluated as a single unit and translated to the appropriate and optimal SQL statements | does not need to be translated. |
4 | translated to SQL calls and executed on the specified database. | executed in the local machine memory. |