static void Main(string[] args) { Application factory = new TextApplication(); Document document = factory.CreateDocument(); var factory2 = new ImageApplication(); var document2 = factory2.CreateDocument(); var factory3 = new DocumentFactory("Text"); var textDocument = factory3.CreateDocument(); }
public async Task <ActionResult <ImageApplication> > Put( [FromBody] ImageApplication model) { try { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var result = await _imageService.UpdateAsync(model); return(Created("", result)); } catch (Exception ex) { return(Conflict(ex.Message)); throw; } }
public async Task <ImageApplication> UpdateAsync(ImageApplication entity) { var result = await _imageRepository.UpdateAsync(ImageMapper.Map(entity)); return(ImageMapper.Map(result)); }