refactor discharge practice lambda expression


these twin methods show repetition:



public stationary expression<func<foo, fooeditdto>> editdtoselector()
{
relapse f => new fooeditdto
{
propertya = f.propertya,
propertyb = f.propertyb,
propertyc = f.propertyc,
propertyd = f.propertyd,
propertye = f.propertye
};
}

public stationary expression<func<foo, foolistdto>> listdtoselector()
{
relapse f => new foodto
{
propertya = f.propertya,
propertyb = f.propertyb,
propertyc = f.propertyc
};
}


how i refactor discharge repetition?



update: oops, i neglected plead an vicious point. fooeditdto subclass foodto.



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?