public async Task <bool> SaveAsync(Domain.Models.ScheduledItem talk) { var dbScheduledItem = _mapper.Map <Sql.Models.ScheduledItem>(talk); _broadcastingContext.Entry(dbScheduledItem).State = talk.Id == 0 ? EntityState.Added : EntityState.Modified; return(await _broadcastingContext.SaveChangesAsync() != 0); }
public async Task <bool> DeleteAsync(Domain.Models.ScheduledItem scheduledItem) { return(await DeleteAsync(scheduledItem.Id)); }