Ejemplo n.º 1
0
        public async Task Add(AddExampleModel model)
        {
            var entity = _mapper.Map <Example>(model);

            _repository.Add(entity);

            await _repository.SaveChangesAsync();
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Save(AddExampleModel command)
        {
            await _mediator.Send(new AddExamplesCommand(new List <AddExampleModel> {
                command
            }));

            return(Ok());
        }
Ejemplo n.º 3
0
 public async Task <IActionResult> Update(Guid id, AddExampleModel model)
 {
     //await _exampleService.Update(id, model);
     return(Ok());
 }
Ejemplo n.º 4
0
        public async Task <IActionResult> Save(AddExampleModel model)
        {
            await _exampleService.Add(model);

            return(Ok());
        }
Ejemplo n.º 5
0
        public async Task <IActionResult> Update(Guid id, AddExampleModel command)
        {
            await _mediator.Send(Edit.For(id, command));

            return(Ok());
        }