public Record Add(MultimediaDto dto) { var hash = HashImageAndSaveInServer(dto.Base64); Map map = CreateMap(hash, dto); return(_mapsService.Add(map)); }
public async Task <ActionResult <Record> > AddMultimedia(MultimediaDto dto) { return(await Task.Run(() => { var output = _multimediaService.Add(dto); return new ActionResult <Record>(output); })); }
private Map CreateMap(string hash, MultimediaDto dto) { Map map = new Map() { CreatedDate = DateTime.Now, Name = dto.Name, Description = dto.Description, FloorId = dto.ParentId, HashData = hash, Extension = "png" }; return(map); }
private MultimediaDto CreateDto(Map map, string base64) { MultimediaDto dto = new MultimediaDto() { MultimediaId = map.Id, ParentId = map.FloorId, Base64 = base64, CreatedDate = map.CreatedDate, Name = map.Name, Description = map.Description, }; return(dto); }