Day to day good stuff I find regarding my work

Wednesday, December 16, 2009

Linq sorting

I use LINQ -SQL and returns a List that needs to have a customized sorting


Example
List data = FindShareOfGrowth(lstCountries, new DateTime(2009,10,5))

this needs to have a customized sorting

like

data.ChartSort()




public List FindShareOfGrowth(List lstCountry, DateTime minDate)
{
var db = new ValueUpDBDataContext();
var queryNN = FindAllNNHelper(db, lstCountry, minDate);
var queryAll = FindAllMinMaxNNHelper(db, chartNr, lstCountry, minDate);

queryAll.ToList();
var query = from nn in queryNN
join all in queryAll on new { K1 = nn.DateRange, K2 = nn.Name }
equals new { K1 = all.DateRange, K2 = all.Name }
select new ChartData
{
Name = nn.Name,
DateRange = nn.DateRange,
Value = nn.Value / all.ValueAbs,
Volume = nn.Volume / all.VolumeAbs
};
return query.OrderBy(c => c.DateRange).ThenBy(c => c.Name).ToList();
}

Friday, November 13, 2009

SSIS prestanda Projekt 1

Följande resultat fick vid körning av Projekt 1 Uppgift 1

Jag har användt BIDS Helper som finns på CodePlex och funktionen SSIS Performance Visualization


Blog Archive