RaSor's Tech Blog

September 20, 2008

LINQ: Entity intro

Filed under: LINQ, NET — rasor @ 10:57 pm

Draft…

Lessons learned while trying to learn ORM mapping with LINQ in .NET. (more…)

August 30, 2008

HowTo: LINQ Over WCF – An easy domain table Cache

Filed under: EntLib, LINQ, WCF — rasor @ 5:36 pm

In many apps tables containing ID’s and names for a domain – guess they are called domain tables – needs to be cached in the biz layer.
In web apps the caching procedure is well documented and implemented in System.Web.Caching. Cache is a thread-safe object, that doesn’t requires explicit locking.
In non-web apps then what to do?
This article suggests to use LINQ over self-hosted WCF.

(more…)

August 12, 2008

LINQ with VB.NET: Join SQL with a CSV file or List of objects

Filed under: Databases, LINQ, NET, SQL — rasor @ 10:35 am

One of the big advantages with LINQ is that you can do operations on sets in the data access layer instead of doing them in the database.

An example of this is to join a table from a CSV-file with a table in a database. In this example the CSV-file has been loaded into a List(Of CsvRecord), where CsvRecord is an entity object representing the content of the file. Code for that class contains properties for each column. The code is not shown here. For this example it just contains the property CsvId, which is used for joining with the SQL server.

Update of the resultset back to SQL server is possible and easy (Wow), but not shown in this post. (more…)

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.