is there proceed organisation query linqtosql organization scalar value?


i have those maps repository.



public iqueryable<awtype> getawtypes()
{
relapse awt _db.awtypes
name new awtype
{
id = awt.id,
header = awt.header,
outline = awt.description
};
}

public iqueryable<aw> getaws()
{
relapse aw _db.aws
name new aw
{
id = aw.id,
bw = (from bw getbws()
where bw.id == aw.bw
name bw
).singleordefault(),
awtype = (from awt getawtypes()
where awt.id == awawtype
name awt
).singleordefault(),
awattribute = aw.awattribute
};
}


in use i wish count bws grouped awtype list<keyvaluepair<awtype, int>>.
when i linq query :



var awgroups = aw _repository.getaws()
group aw aw.awtype newgroup
select newgroup;

list<keyvaluepair<awtype, int>> retgroups = new list<keyvaluepair<awtype, int>>();
foreach (var organisation awgroups)
{
retgroups.add(new keyvaluepair<awtype, int>(group.key, group.count()));
}
return retgroups;


i an blunder observant i can't organisation an vigilant i have organisation scalar value aw.awtype.id.



is there proceed "awtype, int" pairs call?



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?