public bool CreateAudio(AudioDTO dto) { bool result = false; AudioDTO resultData = audioDataAccess.CreateAudio(dto); if (resultData.AudioData != null) { result = loader.SaveMedia(resultData.Id, resultData.BelongsToNewsId, resultData.GetAudioBytes()); MessageQueueManager manager = MessageQueueManager.Instance; manager.PublishMessage(resultData.BelongsToNewsId, resultData.Id, resultData, MessageOperation.Insert); } return(result); }
public bool UpdatePicture(PictureDTO pic) { bool resault = false; PictureDTO dataResult = pictureData.UpdatePicture(pic); if (dataResult != null) { loader.SaveMedia(dataResult.Id, dataResult.BelongsToNewsId, dataResult.GetPictureBytes()); MessageQueueManager menager = MessageQueueManager.Instance; menager.PublishMessage(dataResult.BelongsToNewsId, dataResult.Id, dataResult, MessageOperation.Update); resault = true; } return(resault); }