public void AddItem(string playlistId, string contentId) { if (_itemsDbService.Exists(x => x.PlaylistId == playlistId && x.ContentId == contentId)) { return; } _itemsDbService.UpdateItem(new PlaylistItemEntity() { PlaylistId = playlistId, ContentId = contentId, }); }
public PlaylistItemEntity AddItem(string playlistId, string contentId, int index = -1) { if (_itemsDbService.Exists(x => x.PlaylistId == playlistId && x.ContentId == contentId)) { return(null); } var item = new PlaylistItemEntity() { PlaylistId = playlistId, ContentId = contentId, }; _itemsDbService.CreateItem(item); return(item); }