oliverbooth.dev/OliverBooth/Data/StringListConverter.cs
Oliver Booth cbfdefae71
style: redesign projects page
This change separates the project logo and details into separate pages and makes the list more visually striking.
2023-12-24 12:20:03 +00:00

13 lines
359 B
C#

using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace OliverBooth.Data;
internal sealed class StringListConverter : ValueConverter<IReadOnlyList<string>, string>
{
public StringListConverter(char separator = ' ') :
base(v => string.Join(separator, v),
s => s.Split(separator, StringSplitOptions.None))
{
}
}