public async Task Add(AddExampleModel model) { var entity = _mapper.Map <Example>(model); _repository.Add(entity); await _repository.SaveChangesAsync(); }
public async Task <IActionResult> Save(AddExampleModel command) { await _mediator.Send(new AddExamplesCommand(new List <AddExampleModel> { command })); return(Ok()); }
public async Task <IActionResult> Update(Guid id, AddExampleModel model) { //await _exampleService.Update(id, model); return(Ok()); }
public async Task <IActionResult> Save(AddExampleModel model) { await _exampleService.Add(model); return(Ok()); }
public async Task <IActionResult> Update(Guid id, AddExampleModel command) { await _mediator.Send(Edit.For(id, command)); return(Ok()); }