* upgrade sdk * fix warnings in ersatztv.ffmpeg * fix warnings in ersatztv.core * fix warnings in ersatztv.infrastructure * fix warnings in ersatztv.application * disable analysis for migrations projects * fix warnings in ersatztv.scanner * fix warnings in ersatztv * upgrade project framework * update github actions and dockerfiles
15 lines
457 B
C#
15 lines
457 B
C#
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
namespace ErsatzTV.Infrastructure.Data.Configurations;
|
|
|
|
public class IntCollectionValueConverter : ValueConverter<ICollection<int>, string>
|
|
{
|
|
public IntCollectionValueConverter() : base(
|
|
i => string.Join(",", i),
|
|
s => string.IsNullOrWhiteSpace(s)
|
|
? Array.Empty<int>()
|
|
: s.Split(',', StringSplitOptions.None).Select(int.Parse).ToArray())
|
|
{
|
|
}
|
|
}
|