Concat() . , Enumerable.Repeat():
list.DataSource = Enumerable.Repeat(new Entity(), 1)
.Concat(GetEntitiesFromDB());
( singleton 1):
public IEnumerable<T> AsSingleton<T>(this T @this)
{
yield return @this;
}
list.DataSource = new Entity().AsSingleton().Concat(GetEntitiesFromDB());
, Prepend:
public IEnumerable<T> Prepend<T>(this IEnumerable<T> source, params T[] args)
{
return args.Concat(source);
}
list.DataSource = GetEntitiesFromDB().Prepend(new Entity());