Beispiel #1
0
        public void Execute(PlaceCreateDto request)
        {
            _validator.ValidateAndThrow(request);

            var place = _mapper.Map <Place>(request);

            _context.Places.Add(place);

            _context.SaveChanges();
        }
 public IActionResult Post([FromBody] PlaceCreateDto dto, [FromServices] ICreatePlaceCommand command)
 {
     _executor.ExecuteCommand(command, dto);
     return(Ok("uneto"));
 }