public async Task <PlayListDto> CreatAsync(PlayListDto item) { var result = _context.PlayLists.Add( PlayListConverter.Convert(item)); await _context.SaveChangesAsync(); return(PlayListConverter.Convert(result.Entity)); }
public async Task <bool> UpdateAsync(PlayListDto item) { if (item == null) { return(false); } _context.PlayLists.Update(PlayListConverter.Convert(item)); await _context.SaveChangesAsync(); return(true); }
public async Task <PlayListDto> GetById(Guid id) { return(PlayListConverter.Convert(await _context.PlayLists.FindAsync(id))); }
public async Task <List <PlayListDto> > GetAllPlayList() { return(PlayListConverter.Convert(await _context.PlayLists.ToListAsync())); }