public static async Task Seed(ICategoriesStorage storage) { if (await storage.IsEmptyAsync()) { foreach (var category in Categories) { await storage.AddAsync(category); } } }
public SyncController(ICategoriesStorage storage) { this.storage = storage; }
public CategoriesController(ICategoriesStorage storage, ICategoryEventPublisher eventPublisher) { this.storage = storage; this.eventPublisher = eventPublisher; }