using System.Collections.Generic;
public static void Main()
Console.WriteLine("Hello World");
public abstract class LocalizableEntity<TLocalizedEntity> where TLocalizedEntity : class, ILocalizedData, new()
public abstract string Id { get; set; }
public abstract List<TLocalizedEntity> LocalizedData { get; set; }
public interface ILocalizedData
string CultureName { get; set; }
public void MergeData<TEntity, TLocalizedEntity>(IEnumerable<TEntity> newItems)
where TEntity : LocalizableEntity<TLocalizedEntity>
where TLocalizedEntity : class, ILocalizedData, new()
var existingItems = new List<TEntity>();
var deletedItems = existingItems
.ExceptBy(newItems.Select(x => x.Id), x => x.Id, StringComparer.InvariantCultureIgnoreCase);