SQL Server 2008 Ent ASP.NET MVC 2.0 Linq to SQL
I am creating a gaming site that tracks when a specific player (toon) has hit a specific monster (boss). The table looks something like this:
int ToonId int BossId datetime LastKillTime
I use the 3d party service, which returns the latest information to me (toon, boss, time).
Now I want to update my database with this new information.
Brute force approach is to take turns in turn. But it looks ugly (by code) and probably too slow.
I think the best solution would be to insert new data (using a temporary table?) And then run the MERGE statement.
Is that a good idea? I know that temporary tables are "better avoided." Should I create a permanent table "temp" just for this operation?
Or should I just read the entire current set (no more than 100 lines), combine and return it from the application?
Any pointers / suggestions are always welcome.
merge linq-to-sql
THX-1138
source share