public async Task <IActionResult> AddPattern([FromBody] PatternAddForm json) { var photoName = await _photoService.SafePhoto(json.Photo); var id = _furnitureService.AddPattern(photoName, json); var response = _furnitureService.GetSingle <Material, MaterialResponse>(id); response.Photo = photoName; return(StatusCode(201, response)); }