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 i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members